Reports Monday that the U.S. would soon withdraw all its forces from Iraq were turned on their heads minutes later when U.S. Defense Secretary Mark Esper told reporters there were no plans to pull up stakes.

'There's been no decision whatsoever to leave Iraq, period,' Esper said, adding that he and his staff were 'trying to figure out' the meaning of a letter signed by a brigadier general that suggested the opposite.

'There are no plans to leave,' he emphasized, suggesting discussion of a massive troop movement could be merely a signal that forces are being repositioned inside Iraq's borders.

Separately, Chairman of the Joint Chiefs of Staff Gen. Mark Milley told reporters that the letter was 'a draft. It was a mistake. It was unsigned. It should not have been released.'

The draft was 'poorly worded' and 'implies withdrawal. That is not what’s happening,' Milley declared.

The U.S. military had appeared to inform Baghdad that it was preparing for 'movement out of Iraq,' a day after the Iraqi parliament urged the government in a non-binding resolution to oust foreign troops.

The head of the Pentagon task force in Iraq, Brigadier General William Seely, sent a draft letter to the head of Iraq's joint operations command.

'Sir, in deference to the sovereignty of the Republic of Iraq, and as requested by the Iraqi Parliament and the Prime Minister, [the coalition] will be repositioning forces over the course of the coming days and weeks to prepare for onward movement,' Seely wrote. He added: 'We respect your sovereign decision to order our departure.'

Defense Secretary Mark Esper told reporters Monday that the U.S. had not decided to withdraw forces from Iraq, despite a letter saying otherwise written by a general in charge fo the anti-ISIS coalition there

Some 5,200 U.S. soldiers are stationed across Iraqi bases to support local troops preventing a resurgence of ISIS

The Pentagon said this letter, informing an Iraqi military leader the the U.S. and other coalition forces are pulling up stakes, was a draft and should never have been sent

While the letter was real, Chairman of the Joint Chiefs of Staff Gen. Mark Milley told reporters that it was only a draft that should never have been released; Milley is pictured last week at President Donald Trump's Mar-a-Lago resort

President Donald Trump said Sunday aboard Air Force One that troops would not leave Iraq unless the country compensated the U.S. for the costs associated with building and maintaining military facilities there.

'We have a very extraordinarily expensive air base that's there. It cost billions of dollars to build. Long before my time,' he said. 'We're not leaving unless they pay us back for it.'

Trump also said he would punish Baghdad economically if U.S. troops were evicted.

'We will charge them sanctions like they've never seen before ever. It'll make Iranian sanctions look somewhat tame,' he warned.

Yet Iraqi premier Adel Abdel Mahdi met with the U.S. Ambassador Matthew Tueller on Monday, telling him it was 'necessary to work together to withdraw foreign forces from Iraq.'

A Pentagon official said Monday evening he was not surprised Seely was working on a draft of the letter that was released prematurely.

The official explained that military commanders who are stationed inside foreign countries routinely inform their host nations about troop movements.

President Donald Trump said Sunday that he would only withdraw troops if Iraq paid the U.S. for building and maintaining the main air base the coalition uses

Seely's letter, he said, was likely part of a contingency plan initiated when the Defense Department first contemplated the possibility of a troop pullout.

The president ordered a withdrawal from Syria in October with little notice, catching commanders in the field by surprise.

The Pentagon source said that experience has weighed on some generals' minds and informed their decisions about executing practical tasks, like notifying local officials about near-term plans, that go along with tactical movements in the field.

Seely's letter was designed mainly to alert Iraqi commanders about nighttime helicopter flights that would ferry Marines and soldiersout of Baghdad in the event the White House were to order a mass evacuation.

On Sunday, Iraq's parliament voted in favor of the Baghdad government rescinding its permission for all foreign troops to remain in the country.

That came in reaction to a U.S. precision drone strike on Baghdad that killed Iranian general Qasem Soleimani and top Iraqi commander Abu Mahdi al-Muhandis, among others.

The resulting chaos has made some in Iraq fear a new civil war, and drew millions to crowd streets in Tehran to see Soleimani's coffin paraded through the city.

Iran is considering its options against America in retaliation for the killing of Quds commander Qassem Soleimeni in Baghdad. The conflict could quickly spiral out of control, dragging in other world powers including Russia, Turkey and China

Key figure: The letter from the Marine general in charge of coalition forces fighting ISIS and training the Iraqi army comes after the drone strike which killed Iran's Qassem Soleimani, its most senior commander who the U.S. designated a terrorist

And tensions betweeen Washington and Tehran aren't going away: The U.S. will send six B-52 bombers to the Diego Garcia air base on an island in the Indian Ocean, accordign to CNN, to prepare for the possibility of military action against Iran.

Gen. Seely wrote on Monday in order to reposition thousands of troops elsewhere, 'Coalition Forces are required to take certain measures to ensure that the movement out of Iraq is conducted in a safe and efficient manner.'

The letter was signed by a U.S. official on Pentagon letterhead, making it unclear whether it applied to forces from the 76 countries which make up the international coalition.

An Iraqi defense official confirmed the letter was real and had been delivered.

Officials said helicopters would be traveling in and around the Green Zone as part of the preparations.

Reporters could hear helicopters flying low over Baghdad throughout the night on Monday.

Some 5,200 U.S. soldiers are stationed across Iraqi bases to support local troops preventing a resurgence of the ISIS terror group.

They make up the bulk of the broader coalition, invited by the Iraqi government in 2014 to help combat the jihadists.

Soleimani's death has galvanized Iranians around revenge for the 'martyr'; Hundreds of thousands crowded into Tehran streets to see his coffin on Monday

Ending America's 17-year military presence in Iraq is a risky undertaking for the country.

Iraq was barely starting to recover from a devastating four-year war against ISIS when the mass uprising against the country's ruling elite erupted on Oct. 1, forcing the resignation of Prime Minister Adel Abdul-Mahdi two months later. He hasn't been replaced.

A pullout of U.S. troops could cripple the fight against ISIS militants and allow the extremists to make a comeback.

Militants affiliated with ISIS routinely carry out attacks in northern and western Iraq, hiding out in rugged desert and mountainous areas. Iraqi forces rely on the U.S. for logistics and weapons in pursuing them.

An American withdrawal could also enable Iran to deepen its influence in Iraq, which like Iran is a majority Shiite country.

'It is not that simple,' Lebanese political analyst Ibrahim Bayram said. 'This will increase the complications inside Iraq, the conflicts and contradictions ... and the clash, both political and non-political, between the Iranians and Americans.'