The 1,000 U.S. troops leaving Syria will be allowed to stay in Iraq for at most four weeks, Iraq's defense minister said Wednesday, in an embarrassing rebuff to President Donald Trump's plans for withdrawing from Syria.

Najah al-Shammari's comments to the Associated Press came shortly after his meeting with U.S. Defense Secretary Mark Esper, who went to Baghdad to negotiate the redeployment of U.S. troops in Iraq after they withdrew from Syria.

The emergency meeting came after Esper announced on Monday that the American troops would be stationed along the Iraq-Syria border.

The announcement was seemingly made without bringing Iraq on board first, as the Iraqi government said hours later that the U.S. had not secured permission to do so.

Esper said at the time that U.S. troops would help secure oil fields and monitor ISIS activity from Iraq.

Trump has repeatedly claimed that the U.S. has already defeated ISIS, but the militant group killed two members of the Iraqi security forces and attacked an oil field in the country just this week.

Al-Shammari said Wednesday that he and Esper agreed that American troops leaving Syria would simply be “transiting” through Iraq before moving on to Kuwait, Qatar, or home to the U.S., the AP reported.

Al-Shammari added that this transition would take place “within a time frame not exceeding four weeks,” as cited by the AP.

It was not clear where the troops would be deployed next. The Defense Department has not yet responded to Business Insider's request for confirmation on Esper and al-Shammari's discussions.

Trump has said that one of his reasons to withdraw from northeastern Syria is to end “forever wars” in the Middle East, and bring troops home. Deploying them to Iraq would not have fulfilled this pledge.

US troops withdrawing to Iraq from Syria can’t redeploy there and have to leave in 4 weeks, Baghdad says

A U.S. military convoy leaving Syria near the town of Tel Tamr on Sunday(Associated Press photo)

Earlier on Wednesday Esper said that the U.S. has no plans to leave troops in Iraq “interminably,” the AP reported. He has also met with the country's prime minister, Adel Abdul Mahdi.

The U.S. currently has more than 5,000 troops in Iraq, but has attempted to kept the numbers low due to political sensitivities after the U.S. occupation during the 2003 war, the AP reported.

Esper's meetings in Iraq come a day after Turkey and Syria struck a deal to expand their control and minimize Kurdish territory in northeastern Syria. Russian troops entered northern Syria on Wednesday to partner with Turkey.

It came after Turkish troops entered the region to drive out Kurdish forces, with whom the U.S. had partnered to drive out ISIS militants in the region.

The Turkish incursion was greenlit by Trump's decision to withdraw U.S. troops from northeastern Syria earlier this month.

U.S. troops are making an humiliating exit from Syria, with videos showing their tanks being pelted with rocks and rotten fruit.

Read more from Business Insider: