U.S. forces relocating from Syria to Iraq need to exit Iraq within four weeks, according to Iraq’s defense minister.

U.S. troops “transiting” in Iraq must depart the country before moving to Kuwait, Qatar or the U.S., Iraq’s Defense Minister Najah al-Shammari told The Associated Press Wednesday after meeting with Secretary of Defense Mark Esper.

The statement comes after Iraq’s military said Tuesday that U.S. troops were not welcome to permanently stay in Iraq.

Esper, who arrived in Baghdad earlier on Wednesday, initially said over the weekend that U.S. troops would head to Iraq where they would conduct counterterrorism operations against the Islamic State. Although he said things could change, he said that was the “game plan” at the time.

But on Tuesday, Esper said during an interview with CNN’s Christiane Amanpour that U.S. troops would “temporarily” head to Iraq before ultimately heading home. He also expressed similar sentiments to reporters later.

“We'll reposition as they come out of northeast Syria into Iraq,” Esper told reporters Tuesday at Prince Sultan Air Base in Saudi Arabia. “You know, eventually, their destination is home. But what we've got to do is pull them out deliberately, out of northeast Syria, and make our preparations to go home from there; and I'll have that discussion tomorrow with the Iraqi defense minister about the details.”

“But the aim isn't to stay in Iraq interminably; the aim is to pull our soldiers out and eventually get them back home,” Esper said.

President Donald Trump announced earlier in October that U.S. troops would be pulled from northern Syria, a move that essentially paved the way for Turkey to launch an operation in the region against the Kurds, who have fought alongside the U.S. to combat the Islamic State.

However, Turkey views Kurds with the Syrian Democratic Forces as a branch of a designated terrorist organization.

Although plans have continued to evolve in recent days, Esper said Monday some U.S. troops are set to remain in Syria to safeguard oil from ISIS. Esper said the option was still on the table during his interview with Amanpour.

“Right now, the President has authorized that some would stay in the southern part of Syria,” Esper said. “And we’re looking maybe keeping some additional forces to ensure that we deny ISIS and others access to these key oil fiends also in middle part of the country, if you will. But that needs to be worked out in time. The President hasn’t approved that yet — I need to take him options sometime here soon.”