President Trump has ordered the Pentagon to pull 2,500 U.S. troops from Afghanistan and Iraq by mid-January, acting Defense Secretary Christopher Miller announced Tuesday.

The Defense Department will cut the number of troops in Afghanistan from 4,500 to 2,500 and the number of forces in Iraq from 3,000 to 2,500 by Jan. 15, days before Trump is set to leave office.

“I am formally announcing that we will implement President Trump’s orders to continue our repositioning of forces” from Afghanistan and Iraq, Miller told reporters at the Pentagon.

Miller also said that Trump’s decision “is based on continuous engagement with his national security Cabinet for the past several months, including ongoing discussions with me and my colleagues across the United States government.”

He added that he spoke with “key leaders in Congress as well as our allies and partners abroad to update them on these plans” earlier in the day.

Ahead of Miller’s announcement, a senior Defense official told reporters that the drawdown was a “collaborative decision,” but would not say which military leaders had recommended the plan.

The official also would not say which conditions had been met by the Taliban to warrant such a drawdown in Afghanistan, but insisted that U.S. national security will not be threatened and the troops remaining overseas will still be able to assist allies and partners in Afghanistan and Iraq.

The remaining 2,500 troops “can accomplish everything we have been doing,” the official said.

The drawdown order — which contradicts months of previous advice from top Defense officials — comes a week after Trump fired Defense Secretary Mark Esper and replaced him with Miller.

Esper’s ouster also set off a leadership purge at the Pentagon, with several of those positions now filled by Trump loyalists.

The departures appeared to help clear the way for Trump to order the hasty drawdown, as the military has long argued against going below 4,500 troops in Afghanistan.

Conditions on the ground do not warrant a further drawdown, they have said, as the Taliban has failed to uphold its agreement with the United States for peace in the country.

Days before Trump fired Esper, for example, the Pentagon head sent a classified memo to the president advising that the conditions were not sufficient in Afghanistan for any further troop withdrawals, as it could possibly undermine peace talks, The Washington Post reported.

The senior Defense official on Tuesday would not address the document, telling reporters “we’re not going to comment on any memo that you may or may not have in your possession.”

The official also insisted that “there is no contradiction with the president and his national security Cabinet.”

The sentiment that a further drawdown wouldn’t be prudent was repeated in a Pentagon watchdog report released only hours before Trump’s order, which found that the Taliban has conducted a “small number” of attacks against U.S.-led coalition forces in Afghanistan, despite its February agreement with the administration banning such attacks.

The Operation Freedom’s Sentinel inspector general report marks the first official confirmation that the Taliban has launched attacks against coalition forces in violation of the U.S.-Taliban deal.

Further highlighting the discrepancy between Tuesday’s announcement and previous military opinion, the Pentagon told the inspector general that once it reached 4,500 troops in Afghanistan, it would “pause troop reductions and assess the situation.”

National security adviser Robert O’Brien briefly addressed the drawdowns at the White House on Tuesday, telling reporters that the decision fulfilled Trump’s campaign promise to bring an end to America’s “endless wars.”

“Four years ago, President Trump ran on a promise to put a stop to America’s endless wars,” O’Brien said. “President Trump is keeping that promise to the American people.”

He confirmed the troop reduction by mid-January, with the remaining forces meant to defend embassies and other government facilities and diplomats, and deter foes.

“By May, it is President Trump’s hope that they will all come home safely and in their entirety,” O’Brien said. “I want to reiterate that this policy is not new. This has been the president’s policy since he took office.”

O’Brien also said he had just spoken to NATO Secretary General Jens Stoltenberg regarding the alliance’s contributions to national security and security of overseas missions like those in Iraq and Afghanistan.

While Trump has long promised to return U.S. troops stateside, he announced early in his presidency that he would increase troop levels in Afghanistan from 8,600 to roughly 14,000 at the advice of military advisers.

Since then, his administration has moved to lower that number and in February officials signed a conditional peace deal with the Taliban that calls for a full U.S. withdrawal by May if the group upholds certain commitments such as denying safe haven to al Qaeda.

Since the deal was signed, however, the Taliban has stepped up attacks against Afghan forces, which U.S. officials have repeatedly condemned as threatening the peace process. Officials have also warned that further drawdowns without a show from the Taliban that they are adhering to the agreement will weaken the U.S. position in peace talks.

The senior Defense official insisted on Tuesday that despite the drawdown, talks with the Taliban “are still very much ongoing. … Our goal is the peace deal.”

Trump’s decision was met with swift condemnation from lawmakers in his own party, including House Armed Services Committee ranking member Mac Thornberry (R-Texas), who called the reductions “a mistake.”

“I believe that these additional reductions of American troops from terrorist areas are a mistake. Further reductions in Afghanistan will also undercut negotiations there; the Taliban has done nothing — met no condition — that would justify this cut,” Thornberry said in a statement. “As long as there are threats to Americans and American national security in the world, the U.S. must be vigilant, strong, and engaged in order to safeguard our people and fulfill our duty under the Constitution.”

And Senate Majority Leader Mitch McConnell (R-Ky.) warned Monday that only a “small minority” in Congress would support a rapid drawdown, which he said “would hurt our allies and delight, delight, the people who wish us harm.”

Stoltenberg, meanwhile, has warned of a “very high” price if U.S. and allied forces leave Afghanistan too rapidly, cautioning that the region “risks becoming once again a platform for international terrorists to plan and organize attacks on our homelands.”

NATO leads the international security effort in Afghanistan where it trains and advises Afghan security forces. Of the roughly 12,000 troops that make up the joint counterterrorism mission, known as Resolute Support, more than half are non-U.S. soldiers.

“We now face a difficult decision,” Stoletenberg said in a statement on Tuesday. “We have been in Afghanistan for almost 20 years, and no NATO ally wants to stay any longer than necessary. But at the same time, the price for leaving too soon or in an uncoordinated way could be very high.”

The Hill