— Iranian President Hassan Rouhani was in Baghdad on Monday on his first state visit to Iraq since his election six years ago, shoring up political and trade relations as part of Tehran’s growing clout in the region.

Rouhani, a relative moderate, used the start of his three-day trip to criticize the United States, which has sought to isolate Iran on the international stage. Iraq is a key battleground for rising tensions between Iran and the United States in the Middle East, and the visit is expected to emphasize economic ties to help offset U.S. sanctions on Iran.

The United States “always seeks to create division,” Rouhani said from the Iranian capital, Tehran, before his departure, the Tasnim news agency reported.

In Baghdad, at a news conference with Iraqi President Barham Salih, Rouhani said Iran and Iraq’s shared cultural and religious ties could “not be easily undermined.”

“I feel like I am in my second homeland,” he said. “We have had deep relations for thousands of years — religious, historical, cultural — and we are not planning to let that go.”

Iraq, which shares a 900-mile border with Iran, relies on its eastern neighbor for electricity, military assistance in its battle against Islamic State militants and more. Iran’s political, military and economic power far exceeds that of Iraq, which also has a majority-Shiite population.

The two countries fought an eight-year war in the 1980s, when Iraqi President Saddam Hussein’s forces invaded Iran. But since the U.S.-led invasion of Iraq in 2003, which ousted Hussein, Iran has bolstered its influence in the neighboring country, much to the chagrin of the United States.

In recent months, U.S. officials have urged Iraqi leaders to abandon or at least downgrade relations with Iran. The United States reimposed its near-total trade embargo on Iran in the fall, after President Trump pulled the United States from a 2015 nuclear accord that curbed Iran’s atomic energy program in exchange for major sanctions relief.

The Trump administration has struggled to define its Iraq policy, an effort complicated by the recent departure of key U.S. diplomats with significant experience in the region. The administration has also provided relatively little funding for reconstruction and stabilization activities in cities destroyed in battles between the Islamic State and Iraqi forces backed by U.S. warplanes and advisers.

Trump himself has twice angered Iraqi politicians by suggesting that U.S. troops stay in Iraq either to respond to Islamic State activity in Syria or to “watch Iran.”

Some Iraqi lawmakers said the proposals would violate their nation’s sovereignty and pledged to introduce a bill that would eject the roughly 5,200 U.S. troops in Iraq.

Rouhani said before leaving for Baghdad that he expects to increase trade between the two sides from $12 billion to $20 billion annually.

Even with a sluggish economy at home, Iran has managed to expand its commercial foothold in Iraq. And Iranian products are sold in Iraqi supermarkets, showrooms and pharmacies.

“Iraq is an important Islamic and Arab country and has a major role in the region,” Rouhani said Monday.

He said that Iran’s mutual interests with Iraq included investment, trade, tourism, finance, water, oil and electricity.

Cunningham reported from Istanbul, and El-Ghobashy from Toronto.