Iraqi Prime Minister Haidar al-Abadi’s visit to Iran has been canceled after he said he had no choice but to abide by U.S. sanctions against Tehran, even though he disagreed with their imposition.

The dispute over sanctions was not officially cited on August 12 in the cancelation of the visit, part of a planned two-country official trip by the Iraqi leader.

Abadi’s office said he would still go ahead with a visit to Turkey on August 14 but that the Iran leg of the trip had been called off "because of his busy schedule."

An Iranian government official, who asked not to be identified, told the Associated Press that Tehran had canceled Abadi’s planned visit. Iranian government spokesman Saad al-Hadithi declined to comment.

Iran and Iraq -- enemies in a brutal eight-year war that ended in 1988 -- have developed close ties since Iraqi leader Saddam Hussein was toppled in 2003 by a U.S.-led invasion.

Shi'ite-led Iran has become heavily involved in Iraq's political affairs and sponsors powerful Shi'ite militia groups that played a role in defeating Islamic State (IS) extremists last year.

Iraq has also established close relations with the United States in the subsequent years, especially in the fight against Al-Qaeda and IS.

Meanwhile, Tehran and Washington have long been bitter adversaries, forcing Baghdad to delicately balance relations with both countries.

Iran’s economy has come under intense strain since U.S. President Donald Trump pulled out of the 2015 nuclear deal that Tehran signed with six world powers and reimposed sanctions that had been eased under the terms of the accord.

'Strategic Mistake'

Abadi on August 7 said he did not agree with the renewed U.S. sanctions but added that he would abide by them to protect his country's interests and risk retaliatory actions by Washington.

"Can I, the prime minister of Iraq, endanger the interests of Iraqis just to take a stand?" he said. "We don't sympathize with the sanctions, we don't think they are appropriate, and we don't interact with them, but we are committed to protect our people."

"We consider them a strategic mistake and incorrect, but we will abide by them to protect the interests of our people," he said.

Iraq is the second-largest purchaser of Iranian non-oil exports, buying some $6 billion worth of goods from its eastern neighbor in 2017.

It also buys Iranian-generated electricity to deal with chronic power cuts that have been a key factor sparking mass protests in recent weeks.

Iranian private companies recently cut off power supplies to Iraq's oil-rich coastal province of Basra over outstanding payments.

With reporting by AP, AFP, and Reuters