TEHRAN, Iran (CNN) -- The biggest hurdle standing in the way of peace in Iraq is the presence of American troops there, Iran's Supreme Leader told Iraq's visiting prime minister on Monday, according to Iranian media reports.
Iran's semi-official FARS news agency reported that Ayatollah Ali Khamenei told Iraqi Prime Minister Nuri al-Maliki during their meeting on Monday that the U.S. role in Iraq is the same as that of Iraq's former British rulers -- to create divisions after Iraq's independence.
"We are certain that the Iraqi people, through their will and unity, will cross the current difficult conditions and will reach the place that they deserve, and the Americans' dream about Iraq will not come true, " said Khamenei, according to FARS.
"The occupiers who, without having any rights, interfere in Iraqi affairs through their military and security powers, imagine that the Iraqi people and government are indebted to them," he said. "These are the greatest threat."
Al-Maliki wrapped up his three-day visit to Iran on Monday, returning to Baghdad hours after meeting with Khamenei, an Iraqi government spokesman said.
Iran's Student News Agency (ISNA) also reported that the Supreme Leader told al-Maliki that the U.S. military presence in Iraq is the most fundamental problem the country faces.
His reported remarks come as the United States and Iraq are trying to reach a bilateral agreement on how long the U.S. military will remain in Iraq and what role it will play in Iraq's security.
Al-Maliki media adviser Ali Hadi said negotiations between Iraq and the United States are in their "very early stages" and were not part of the prime minister's talks with Iranian officials during his visit.
"The treaty is purely an Iraqi-American treaty. The Iranians have nothing to do with it," Hadi said. "We will not discuss the progress or the key elements of agreements or disagreements with them because this is an Iraqi issue."
A day after his arrival in Tehran, al-Maliki on Sunday tried to allay Iranian fears over the planned U.S.-Iraq security pact, saying his government would not allow Iraq to become a launching pad for an attack on its neighbor.
"Iraq today doesn't present any threat as it used to be in the times of the former regime, because today's Iraq is a constitutional state based on the rule of law, and it seeks to develop its relations with the regional countries based on cooperation and mutual respect," al-Maliki told Iranian President Mahmoud Ahmadinejad during a Sunday meeting between two leaders, according to a statement from the prime minister's office.
Earlier, Iran's state-run news agency IRNA quoted the Iraqi leader as saying that "Baghdad would not allow its soil to be used as a base to damage the security of the neighboring countries, including Iran."
The proposed U.S.-Iraqi pact has triggered street protests in Iraq, where many suspect the deal could lead to the establishment of American bases, a long-term presence of U.S. troops and a weakening of Iraqi government control over those troops.
Shiite cleric Muqtada al-Sadr, whose militia was the target of a U.S.-backed Iraqi clampdown in Basra and Baghdad recently, has called for weekly protests against the agreement.
Iran has long called for the withdrawal of U.S. troops from Iraq, which Washington invaded in 2003. Meanwhile, the United States accuses Iran of arming and training "criminal" Shiite militias in Iraq and of seeking to develop nuclear weapons, allegations the Iranians deny.
It is al-Maliki's third visit to Iran since he became prime minister more than two years ago. The two countries, which are neighbors, both have Shiite Muslim majorities, and al-Maliki's ruling coalition is dominated by Shiite religious parties long backed by Iran.
Adnan Pachachi, a leading Sunni Arab member of Iraq's parliament, told CNN that he wanted al-Maliki to call on Iran to stop supporting armed factions in Iraq.
"I think this has to stop," Pachachi told CNN. "I hope that Mr. Maliki will make it absolutely clear that Iraqis of all parties, of all sectarian origins and ethnic origins, are strongly opposed to Iran's attempt to interfere in Iraq's affairs."
Pachachi, a former foreign minister, said al-Maliki's predecessor, Ibrahim al-Jaafari, allowed Iraq's security forces to be dominated by sectarian and ethnic militias, and that U.S. troops should remain until those influences are weeded out.
"In the long run, it is in the interest of the United States to have a secure Iraq and armed forces and security forces of Iraq with undivided loyalty and allegiance to the state and not influenced by sectarian affiliations or party loyalties," he said.