BAGHDAD/WASHINGTON (Reuters) - The United States has no plans to pull its troops out of Iraq, Defense Secretary Mark Esper said on Monday, following reports by Reuters and other media of an American military letter informing Iraqi officials about repositioning troops in preparation for leaving the country.

Longtime foes Tehran and Washington have been in a war of words since Friday, when a drone strike ordered by President Donald Trump killed Iranian military commander Qassem Soleimani, widely seen as Iran’s second most powerful figure behind Supreme Leader Ayatollah Ali Khamenei.

Khamenei, 80, wept in grief along with hundreds of thousands of mourners who thronged the streets of Tehran for Soleimani’s funeral on Monday.

Iran’s demand for U.S. forces to withdraw from the region gained traction on Sunday when Iraq’s parliament passed a resolution calling for all foreign troops to leave the country.

The American military letter said U.S.-led coalition forces would use helicopters to evacuate. Several were heard flying over Baghdad on Monday night, although it was not immediately clear if that was related.

“There’s been no decision whatsoever to leave Iraq,” Esper told Pentagon reporters, adding there were no plans issued to prepare to leave.

“I don’t know what that letter is ... We’re trying to find out where that’s coming from, what that is. But there’s been no decision made to leave Iraq. Period,” Esper said.

The letter caused confusion about the future of U.S. forces in Iraq, who now number 5,000. A U.S.-led invasion in 2003 toppled dictator Saddam Hussein.

The top U.S. military officer told reporters the letter was a draft document meant only to underscore increased movement by U.S. forces. “Poorly worded, implies withdrawal. That’s not what’s happening,” said Army General Mark Milley, chairman of the military’s Joint Chiefs of Staff.

The authenticity of the letter, addressed to the Iraqi Defence Ministry’s Combined Joint Operations, had been confirmed to Reuters by an Iraqi military source.

STILL COMMITTED

Esper said Washington was still committed to countering Islamic State in Iraq, alongside allies and partners.

“Sir, in deference to the sovereignty of the Republic of Iraq, and as requested by the Iraqi Parliament and the Prime Minister, CJTF-OIR will be repositioning forces over the course of the coming days and weeks to prepare for onward movement,” the letter stated.

It was signed by U.S. Marine Corps Brigadier General William Seely III, commanding general of the U.S.-led military coalition against Islamic State. CJTF-OIR stands for Combined Joint Task Force–Operation Inherent Resolve.

“We respect your sovereign decision to order our departure,” the letter said.

Iraqi caretaker Prime Minister Abdel Abdul Mahdi told the U.S. ambassador to Baghdad on Monday that both nations needed to implement the Iraqi parliamentary resolution, the premier’s office said in a statement. It did not give a timeline.

Khamenei led prayers at the funeral in the Iranian capital, pausing as his voice cracked with emotion. Soleimani, 62, was a national hero even to many who do not consider themselves supporters of Iran’s clerical rulers.

Slideshow ( 21 images )

Mourners packed the streets, chanting: “Death to America!” - a show of national unity after anti-government protests in November in which many demonstrators were killed.

The crowd, which state media said numbered in the millions, recalled the masses gathered in 1989 for the funeral of the Islamic Republic’s founder, Ayatollah Ruhollah Khomeini.

The killing of Soleimani has prompted fears around the world of a broader regional conflict, as well as calls in the U.S. Congress for legislation to keep Trump from going to war against Iran.

Esper, Milley and other top U.S. officials agreed to provide a classified briefing for U.S. senators on Wednesday to discuss events in Iraq after some lawmakers accused the White House of risking a broad conflict without a strategy.

Slideshow ( 21 images )

NUCLEAR DEAL

Amid the tensions, the Trump administration denied a visa that would have allowed Iranian Foreign Minister Mohammad Javad Zarif to attend a U.N. Security Council meeting in New York on Thursday, a U.S. official said, as Tehran faces the possible reimposition of U.N. sanctions lifted under a landmark 2015 agreement with major powers to curtail its nuclear program.

Iran on Sunday dropped all limitations on its uranium enrichment, another step back from commitments under the deal, which Trump abandoned in 2018.

France’s foreign minister said European powers would decide in coming days whether to launch a dispute resolution process that could lead to a reinstatement of U.N. sanctions on Iran.

Milley said the threat from Soleimani was imminent even if U.S. intelligence did not exactly say “who, what, when, where” concerning attacks he was said to be planning. “We would have been culpably negligent to the American people had we not made the decision we made,” he said.

Trump has vowed to strike 52 Iranian targets, including cultural sites, if Iran retaliates with attacks on Americans or U.S. assets, although U.S. officials sought to downplay his reference to cultural targets. The 52 figure, Trump noted, matched the number of U.S. Embassy hostages held for 444 days after the 1979 Iranian Revolution.

Graphic on 1979-81 Iran hostage crisis:

Responding to Trump, Iranian President Hassan Rouhani wrote on Twitter on Monday: “Those who refer to the number 52 should also remember the number 290. #IR655.” He referred to the 1988 shooting down of an Iranian airline by a U.S. warship in which 290 were killed.

Trump also took to Twitter to reiterate the White House stance that “Iran will never have a nuclear weapon.”

General Esmail Ghaani, Soleimani’s successor as commander of Iran’s Revolutionary Guards elite Quds Force, promised to “continue martyr Soleimani’s cause as firmly as before with the help of God, and in return for his martyrdom we aim to rid the region of America.”

Other political and military leaders have made similar, unspecific threats. Iran, which lies at the mouth of the key Gulf oil shipping route, has a range of proxy forces through which it could act.

The U.S. Department of Homeland Security issued a cybersecurity warning on Monday, citing increased tension with Iran and its proxies.