BAGHDADinfo-icon -- Iranian President Hassan Rouhani capped his state visit to Iraqinfo-icon on Wednesday by meeting the country's most respected religious authority, Grand Ayatollah Ali Sistani-- a sit-down that has eluded previous Iranian presidents and American leaders alike.

The meeting signals to Washington that the religious, cultural and economic bonds that tie Iraninfo-icon and Iraq will not be undermined by a focused U.S. effort to isolate Tehraninfo-icon, analysts said. At the same time, it is likely to bolster Rouhani's standing at home.

The session came after Rouhani and Iraqi Prime Minister Adel Abdul Mahdi announced agreements to boost trade, establish a rail link between the two countries and take steps to remove travelinfo-icon restrictions for tourists and investors. Abdul Mahdi also said Iran agreed to return to the original terms of a 1975 agreement on the sharing of an important waterway.

Officials from both countries said that details of the agreements would be released at a later date but that the message was clear: Iraq will not be a party to renewed U.S. sanctions on Iran.

"The Iranian side praised Iraq's decision that it would not be part of the sanctions against them," the Iraqi prime minister said in a statement.

Hussein Dawood of the European Council on Foreign Relations wrote on Wednesday, "Through a series of high-level meetings and agreements with Iran's president, the Iraqi government signaled that it is not prepared to be part of the USinfo-icon maximum pressure campaign against Iran."

For Iraq, Rouhani's three-day visit represented a break from Tehran's usual methods of exerting influence, which include activities inside Iraq by Iranian-allied militias and leading figures from Iran's powerful Revolutionary Guard Corps. Sistani referenced these activities during his meeting with the Iranian president.

The 88-year-old cleric, who is rarely seen in public and whose views are almost always delivered through intermediaries, said in a statement that he welcomes "any steps to strengthen Iraq's relations with its neighbours . . . based on respect for the sovereignty of the countries and no interference in domestic affairs." The statement was widely interpreted as a reference to Iraqi Shiite militias that are ideologically linked to Iran, which supports them with money and weaponsinfo-icon.

Those militias gained popular support with many Iraqis for helping to defeat the Islamic Stateinfo-icon and have since secured wide-ranging political influence through Iraq's parliament. They have also gained informal control of key Sunni Musliminfo-icon regions they helped clear of Islamic State occupation.

The U.S. government and many Iraqis view the militias as Iranian proxies outside the control of Iraq's central authorities.

In addition to representing a rebuke of Iran's support for the militias, Sistani's meeting with Rouhani was important for strengthening the Iranian president's position at home.

Iranian policy in Iraq has been dominated by the Revolutionary Guard Corp, which arms and funds the network of loyal proxy militias. Hard-line figures close to the Revolutionary Guard have recently criticized Rouhani, a relative moderate, and his cabinet of technocrats. They have denounced him as weak in the face of pressure from the United Statesinfo-icon, which reimposed sanctions on Iran after withdrawing last year from the nuclear deal.

But Sistani, a revered figure with a large following in Iran, has refused to meet with the powerful commander of the Revolutionary Guard's elite Quds Force, Qasem Soleimani. Similarly, Sistani rejected a meeting with former president and hard-line politician Mahmoud Ahmadinejad.

"Sistani's selective engagement with the more pragmatic forces of Iranian politics could boost Rouhani's domestic standing at a time that the discredited Iranian president needs it the most," said Ali Vaez, an Iran expert with the International Crisis Group. "Sistani's imprimatur on the more moderate approach in Iranian foreign policyinfo-icon is a badge of honor for Rouhani and his team."

Rouhani's meeting with Sistani and the generally positive reception the Iranian leader received in Iraq is a reminder of the limits of the "zero-sum prism that [the United States] views much of its regional rivalry with Iran," Vaez said.

"Washington has to acknowledge that Tehran has soft-power advantages that the U.S. lacks," he added. "If it wants to curb Iranian influence, instead of countering Tehran, it should compete with Tehran's soft power and economic outreach by helping Baghdad become more self-reliant."

The Story was first published in The Washington Post