Washington — An agreement the United States is negotiating with Iraq on the conditions for the long-term stationing of American forces there is under fire from national legislative leaders in both countries.

At the same time, an accord that would permit the US to keep soldiers on Iraqi soil for years to come – the same kind of agreement that governs the US military presence in South Korea, Japan, and Germany – faces criticism from some of Iraq's neighbors, especially Iran.

Some Iraqi parliamentarians fear the proposed agreement would keep Iraq an occupied country and a venue for the US to fight its battles with Al Qaeda and Iran. Some in the US Congress worry a deal could tie the hands of the next president on Iraq policy. Both groups say the executive branches of the two countries are too tight-lipped about a negotiating process that was supposed to be transparent.

"Any [details] we have about this agreement have come through the media, but what we have learned tells us this agreement is totally unfair to the Iraqi people," says Khalaf al-Alayyan, a Sunni sheikh and parliamentarian leader of the Iraqi National Dialogue Council, a party favoring a US withdrawal. "Whoever has a chance to look at it would realize Iraq [under the proposed agreement] would not just be an occupied country, but as if it were part of the United States."

The US-Iraq security accord was at the center of Iraqi Prime Minister Nouri al-Maliki's visit Sunday to Tehran, where he tried to assuage Iranian leaders' concerns about a permanent US presence on their doorstep. "We will not allow Iraq to become a platform for harming the security of Iran," Mr. Maliki said, according to IRNA, the state-run Iranian news service.

The Maliki government wants the agreement with the US to replace a United Nations mandate for the stationing of foreign forces in the country, which expires at year's end. But its growing economic and political relationship with Tehran is testing its ability to simultaneously pursue a US-Iraqi accord.

Two accords are actually being negotiated – a status-of-forces agreement setting rules for a US military presence in Iraq and a broader "framework agreement" defining the long-term security, political, economic, and cultural ties between the two countries.

"We have a large number of these agreements, and in many cases with countries where there is no question of their full sovereignty over their own affairs," says Patrick Clawson, deputy director of the Washington Institute for Near East Policy. "But at the same time they are almost always controversial."

Public uproar in Japan over cases of sexual abuse and other crimes committed by US soldiers stationed there is one example Mr. Clawson cites. But other analysts say the Bush administration's apparent pressure to get long-term basing rights in Iraq is the main issue that has the Iraqi side balking.

"If the first draft of this thing bears any resemblance to what we've heard, if there's any reference even to long-term bases, then they [in the administration] really are tone deaf," says Wayne White, a former Iraq policy analyst at the State Department. For an idea of how such a plan would go over, all the administration need do is look back to the consequences of the 1948 Portsmouth Agreement between Britain and Iraq, which included basing rights, he says. "There were huge riots, people were killed – and the government reneged," says Mr. White, now an adjunct scholar with the Middle East Institute in Washington.

Iraqi response to the US proposal is complicated by the fact that the Maliki government is weak and unable to move ahead forcefully, given a divided parliament.

Maliki and some Shiites in the ruling coalition favor some kind of agreement with the Americans, who help to keep the government in power. Most Kurds favor a permanent US presence, and even the Sunnis of the US-backed Awakening movement want at least a short-term US presence to protect them from any Shiite backlash.

But opponents insist the US military presence aggravates Iraq's security issues.

"We are told the US military is needed because Iraq would otherwise descend into sectarian fighting, Al Qaeda would reestablish its presence, and … Iraq will fall under the grip of Iran," says Nadim al-Jaberi, a parliamentarian from the Shiite Virtue Party, who, like Sheikh al-Alayyan, was in Washington last week. "Actually the withdrawal of US forces would nullify these problems," he says. "The paradox is that, in the case of Al Qaeda, for example, they had no presence [in Iraq] until the invasion resulted in a heavy American military presence."

President Bush wanted the agreements to be finished by the end of July. But Iraqi resistance to aspects of the pact could mean the US will have to settle for a watered-down accord reached later in the year, analysts say. Some experts say the only alternative at this point is another year-long extension of the UN agreement authorizing the foreign-troop presence – though neither Maliki nor Bush favors that option.