The Islamic State is quietly rebuilding as the United States prepares to complete its withdrawal from Iraq, raising fears the terror group could exploit a security vacuum, a regional security expert warned Sunday.

With U.S. forces leaving by Sept. 30 and as Baghdad tries to rein in Iran-backed militias, Iraq could also be entering its most dangerous period since ISIS seized Mosul in 2014, according to counterterrorism expert Dr. ISIS is waiting actively in the gaps, as it historically always has," Mohammed, author and researcher with the Iraq and Syria.

Now Baghdad is trying to bring armed factions, including Kataib Hezbollah and Asaib Ahl al-Haq, under full state control.

"Sept. 30 is not one deadline; it is two," Mohammed said, referring to the simultaneous U.S. withdrawal and the domestic disarmament push.

"The militias and ISIS are not separate stories; they are deeply interdependent. Each actively justifies the other. Both forces thrive in the unstable spaces the central state cannot hold."

The U.S. withdrawal also follows a 2024 U.S.-Iraq agreement that envisioned ending the mission in Iraq by 2025 while continuing support for anti-ISIS operations in Syria through September 2026. Mohammed warned against repeating past complacency.

"Mosul did not fall in 2014 because ISIS was strong. It fell because everything that would have detected its strength—presence, attention, honest reporting from the ground—had been withdrawn in the years before, while the world's eyes were elsewhere."

Meanwhile, Iraqi Prime Minister Ali al-Zaidi’s White House meeting July 14, where it was announced remaining U.S. troops would leave Iraq, drew condemnation from Tehran.

According to Iran International, Ali Akbar Velayati, an adviser to Iran's Supreme Leader Mojtaba Khamenei , called al-Zaidi's trip "regrettable" and claimed it damaged Iraq's dignity.

Mohammed said Iran's influence inside Iraq is important to Tehran after U.S. strikes degraded parts of its proxy network.

"Iran's strategic calculation matters more now than at any point in a decade because Iraq is essentially what Iran has left," Mohammed said. "So the regime's real fear is not resurgence. It is irrelevance."

Tehran fears an Iraq where the government successfully disarms the militias, U.S. forces leave on Baghdad's terms rather than Iran's, and no active security crisis remains to justify armed groups operating outside full state control, he said.

"That said, what happens across the wider region after September will not be decided by anyone's stated intentions or diplomatic promises," Mohammed added.

"I have seen what a city pays when that judgment is wrong. Whether ISIS grows large enough to frighten Iran, or stays just large enough to serve it, will be one of the defining questions of the year after the withdrawal," he warned.

Fox News Digital has reached out to the White House for comment.