The U.S. military is pulling its forces from an American-led coalition base in Iraq and shifting them to Afghanistan following the defeat of Islamic State group militants in the country.

Western contractors at the base say U.S. troops began the drawdown over the past week, with groups of soldiers leaving the base on daily flights. The exact scale of the redeployment was unclear.

According to various estimates, as of 2016, there were more 5,000 U.S. military personnel stationed in Iraq, with nearly 4,000 deployed to support and assist local groups fighting ISIS militants. The remaining personnel included special operations forces, logistics workers and troops on temporary rotations, the BBC reported.

Iraqi officials reportedly said their government reached an agreement with the U.S.-led coalition to reduce the number of troops in Iraq.

The reported military buildup in Afghanistan is the latest sign of a growing U.S. focus on Afghanistan as the primary conflict.

The White House reportedly signed off in August on deploying an additional 4,000 troops in Afghanistan.

The U.S. Army is also floating plans to increase the total U.S. force in the country by 1,000 in a bid to boost Afghan forces' fight against the Taliban, the Washington Post reported.

President Donald Trump introduced a new Afghanistan strategy in August, hinting at relaxing the rules of engagement, acceleration of strikes and other military actions aimed at producing “an honorable and enduring outcome” in Afghanistan.

He warned against premature drawback of troops, referencing to the Obama administration’s decision to withdraw forces from Iraq in 2011.

“A hasty withdrawal would create a vacuum that terrorists, including ISIS and al Qaeda, would instantly fill, just as happened before September 11th.”

Since Trump took office, the number of troops has nearly doubled in Afghanistan – from 8,500 in early 2017 to 14,000 today.

The Associated Press contributed to this report.