Secretary of State Mike Pompeo told Iraqi officials that U.S. intelligence showed Iran-backed militias moved missiles near bases housing American forces.

Pompeo made the disclosure to Iraq’s top brass during his surprise visit earlier this month, Reuters reported. The revelation comes just hours after all non-emergency personnel at the U.S. Embassy in Iraq was ordered to leave the country.

US NON-ESSENTIAL PERSONNEL ORDERED TO LEAVE IRAQ EMBASSY, CONSULATE

He asked the military officials to keep the Shi’ite militias in control as they are expanding their presence in the country and now are part of the country’s security apparatus. The top diplomat warned that otherwise, the U.S. would have to use force to tackle the security threats.

“The message from the Americans was clear. They wanted guarantees that Iraq would stop those groups threatening U.S. interests,” a senior Iraqi military source with knowledge of Pompeo’s trip told Reuters.

“They said if the U.S. were attacked on Iraqi soil, it would take action to defend itself without coordinating with Baghdad.”

A State Department spokesperson told Fox News: “Given the increased threat stream we are seeing in Iraq, which we shared with the Iraqi government during the Secretary’s visit on May 7 and in subsequent engagements, the Secretary has decided to place Mission Iraq on ordered departure.

“Ensuring the safety of U.S. government personnel and U.S. citizens and security of our facilities are our highest priorities. We remain committed to partnering with Iraqis to advance our mutual interests.”

“For safety reasons, I am not able to detail specific security concerns.”

“They said if the U.S. were attacked on Iraqi soil, it would take action to defend itself without coordinating with Baghdad.” — Senior Iraqi military source

U.S. officials said last week that urgent "credible threats" from Iran against Americans were detected in Iraq, prompting the embassy to advise against all travel to the region, citing “heightened tensions.”

On Wednesday morning, all non-emergency personnel at the U.S. Embassy and consulate in Iraq was ordered to leave the country. Normal visa services were also temporarily halted.

But the claim at hostile militia forces are positioning the rockets near bases housing American troops, provides more insight into the threats the U.S. faces in the Middle East in the wake of rising tensions between the Trump administration and the Iranian regime.

COTTON SAYS AMERICA WOULD WIN WAR AGAINST IRAN IN 'TWO STRIKES'

President Trump denied Tuesday the reports that the administration was planning to send more than 100,000 troops to the region in the wake of heightened tensions in the region, but instead noted that “If we did that, we’d send a hell of a lot more troops than that.”

Iraqi Prime Minister Adel Abdul Mahdi told the media on Tuesday that his side didn’t have information showing “movements that constitute a threat to any side,” though added that his government “is doing its duty to protect all parties.”

Secretary of State Mike Pompeo said Tuesday that “We fundamentally do not seek war with Iran, we’re looking for the regime to simply stop conducting assassination campaigns throughout Europe.”

His comments followed numerous threatening comments by Iranian officials who effectively threatened the U.S. with war.

Iran's Supreme leader Ayatollah Ali Khamenei also downplayed the escalation. Iran's state TV quoted Khamenei on Tuesday as calling negotiations with the U.S. "poison" and saying: "This is not a military confrontation, because no war is going to happen."

CLICK HERE TO GET THE FOX NEWS APP

Khamenei, who has final say on all state matters, said: "Neither we, nor they are seeking war, they know that it is not to their benefit."

Iranian state media reported Wednesday however that Khamenei followed up these remarks by saying it wouldn't be difficult for the Islamic Republic to enrich uranium to weapons-grade levels amid rising tensions with the U.S., state media reported Wednesday.

The Associated Press contributed to this report.