BAGHDAD (Reuters) - Iraq and Iran signed several preliminary trade deals on Monday, Iraqi officials said, as Iranian President Hassan Rouhani began his first visit seeking to bolster Tehran’s influence and expand commercial ties to help offset renewed U.S. sanctions.

The deals, among them a plan to build a railway linking the neighbors, emerged soon after the start of Rouhani’s visit, meant to underline that Tehran still plays a dominant role in Iraq despite U.S. efforts to isolate the Islamic Republic.

Iran and Iraq fought a devastating 1980-88 war but the 2003 U.S.-led invasion of Iraq that ousted Saddam Hussein prompted a long Sunni Islamist insurgency during which Iran’s regional sway rose at the expense of the United States.

Rouhani and Iraqi Prime Minister Adel Mahdi signed several memorandums of understanding, Abdul Mahdi’s office said in a statement. They included agreements on oil, trade, health, and a railway linking the southern Iraqi oil city of Basra and the Iranian border town of Shalamcheh.

They had also agreed on measures to make it easier for businessmen and investors to obtain visas, Abdul Mahdi’s office said. The Iranian state news agency IRNA said it was agreed that travel visas would now be free of charge.

Prior to his departure, Rouhani said Shi’ite Muslim Iran was determined to strengthen ties with its Shi’ite-led Arab neighbor, Iranian state television reported.

Those ties “cannot be compared to Iraq’s relations with an occupying country like America, which is hated in the region,” the semi-official Mehr news agency quoted Rouhani as saying before he flew to Baghdad. “One cannot forget the bombs that Americans dropped on Iraq, Syria and other regional countries.”

Slideshow ( 10 images )

Rouhani was due to visit the Shi’ite holy cities of Kerbala and Najaf on Tuesday and Wednesday respectively. He will meet top Iraqi Iraqi Shi’ite cleric Grand Ayatollah Ali al-Sistani in Najaf, Iranian state media said.

A senior Iranian official accompanying Rouhani told Reuters that Iraq was “another channel for Iran to bypass America’s unjust sanctions ... this trip will provide opportunities for Iran’s economy”.

Iraq relies on Iranian gas imports to feed its power grid and has asked for extensions to a U.S. waiver to continue importing Iranian gas since U.S. President Donald Trump restored sanctions on Iran’s vital energy sector in November.

IRANIAN ECONOMY SUFFERING

The slump in Iran’s economy since Trump’s decision last May to pull out of the 2015 nuclear deal between Iran and six major powers has pushed the Islamic Republic to try to expand commercial ties with neighbors.

The 2015 agreement lifted sanctions that had been imposed by the United States, European Union and United Nations in return for Iran curbing aspects of its nuclear program.

The Trump administration said the accord was too generous and failed to rein in Iran’s ballistic missile capabilities and its involvement in regional conflicts in Syria and Yemen.

Other signatories to the deal have been trying to salvage the pact, but U.S. sanctions have largely scared off European companies from doing business with Iran.

The Europeans have promised to help firms do business with Iran as long as it abides by the deal. Iran has itself threatened to pull out of the agreement unless EU powers demonstrably protect its economic benefits.