ABC News September 3, 2021

Former Trump officials praise Biden for carrying out 'Trump-Biden withdrawal' from Afghanistan: ANALYSIS

WATCH: National headlines from ABC News

It's no surprise that former President Donald Trump and his former Secretary of State Mike Pompeo have condemned President Joe Biden's messy withdrawal from Afghanistan -- after all, the chaotic exit from Kabul has been deadly and deeply unpopular -- but the truth is that Biden accomplished exactly what Trump had tried to do in his final year in office.

The only real difference is that Trump wanted to withdraw more quickly and with less regard for the Afghan citizens who worked with the United States.

In fact, while Trump and Pompeo have taken their shots at Biden, some of the key players Trump tapped to carry out his planned withdrawal are actually praising Biden for finishing a job they say Trump started.

"The fact is this was the Trump-Biden withdrawal," said William Ruger, tapped by Trump to be U.S. ambassador to Afghanistan in September 2020.

MORE: GOP struggles for united Afghanistan messaging: The Note
Olivier Douliery/AFP/Getty Images
President Donald Trump speaks to the troops during a surprise Thanksgiving day visit at Bagram Air Field, Nov. 28, 2019, in Afghanistan.

Picking Ruger was one of several personnel moves Trump made during his final months in office to put in place a team committed to one of his top policy goals: a complete U.S. military withdrawal. When the Pentagon announced the last U.S. troops had departed just before Biden's Aug. 31 deadline, Ruger tweeted a one-word response: "Finally."

In April 2020, Trump invited retired Col. Douglas MacGregor to the White House because he had seen the former U.S. Army officer on Fox News making the case that America should get out of Afghanistan – and out of Iraq and Syria, too.

"I am not critical of President Biden's decision. And if you listen to his speech, he said, 'I ended the war.' Bravo! Well done! Get out! This has been an enormous waste of time, money, resources and blood," MacGregor told ABC News after Biden's speech on Tuesday. "So the president is 100 percent correct."

Last November, Trump installed MacGregor as a senior adviser to the secretary of defense, with marching orders to push military leaders to get all U.S. troops out of Afghanistan.

MORE: Historic Afghanistan evacuation wraps up, with fate of those left behind uncertain

"He made very clear to me that he shared my views," MacGregor told ABC News. "And he said, 'I've got to get you in here. Because I agree with you. We need to get out of these places. There's no reason to be in any of them.'"

Andrew Caballero-Reynolds/AFP via Getty Images
President Donald Trump, with Director of the White House Presidential Personnel Office John McEntee, walks to the Oval Office as he returns to the White House, Sept. 11, 2020.

On the day he was appointed, MacGregor was handed a sheet of paper from Director of Presidential Personnel Johnny McEntee spelling out his mission at the Pentagon. With Trumpian bluntness, the paper included just four bullet points. The first one read: "Get out us out of Afghanistan."

On his first day on the job, MacGregor drafted a one-page presidential order to complete the withdrawal of all uniformed U.S. military personnel by Jan. 12, 2021 -- a considerably faster timeline than Biden's ended up being. Trump signed the order on Nov. 11, 2020.

"Donald Trump wanted out," MacGregor said. "It was no secret plan. No misleading agenda. He wanted out."

The withdrawal order horrified top military leaders, including Joint Chiefs Chairman Gen. Mark Milley and CENTCOM commander Gen. Kenneth McKenzie.

Both men had just weeks earlier signed off on a memo written by recently ousted Defense Secretary Mark Esper warning that the withdrawal of U.S. troops would result in chaos in Afghanistan and a heightened terror threat in the U.S.

Saul Loeb/AFP via Getty Images
General Mark Milley, Chairman of the Joint Chiefs of Staff, testifies on the department's fiscal year 2022 budget request during a House Armed Services Committee hearing on Capitol Hill in Washington, D.C., June 23, 2021.

Ultimately, Trump agreed to a slightly slower withdrawal timeline that would bring the number of U.S. troops to Afghanistan down to 2,500 by the time he left office.

"I did exactly what he wanted me to do and then he buckled," MacGregor said of Trump.

During his final year in office, Trump's desire to completely withdraw U.S. forces from Afghanistan became something of an obsession.

He believed his own top national security officials had thwarted his desire to get out of Afghanistan and he set out to purge those he thought were keeping him from getting credit for ending America's longest war.

The purge was spearheaded by McEntee, who Trump made personnel director in February 2020. Trump ultimately made major changes at the Pentagon, including the ouster of a secretary of defense, Esper, who opposed withdrawal.

But the obsession with getting rid of those opposed to the policy was not limited to the Pentagon.

MORE: Biden defends Afghanistan withdrawal, recommits to evacuate remaining Americans

Over the spring and summer of 2020, McEntee's office conducted a series of interviews with top Trump officials across all departments to gauge their true level of loyalty to Trump.

One frequent question asked was this: "Do you support the president's plan to withdraw all U.S. troops from Afghanistan?"

In reporting for my upcoming book, "Betrayal: The Final Chapter of the Trump Show," I discovered that this question was asked of officials who held jobs that had nothing to do with Afghanistan policy, including an official at the Department of Housing and Urban Development and another at the Environmental Protection Agency.

David Dee Delgado/Getty Images
President Donald Trump Arrives at the commencement ceremony for army cadets, June 13, 2020 in West Point, N.Y.

So, when Trump told supporters in an Aug. 22 statement that President Biden gave "enemies all around the world a great and lasting victory when he unexpectedly and inexplicably removed our great soldiers from Afghanistan before taking out our U.S. citizens and allies, along with abandoning many billions of dollars of highest-grade Military equipment," he had had no plan to do anything differently.

Back in April, his biggest criticism of Biden was that he wasn't acting faster and sticking with the May 1 deadline Trump had negotiated with the Taliban.

And, while Biden's evacuation included over 100,000 Afghans vulnerable to the Taliban or who had assisted the U.S. during the 20-year war, Trump had no real plan to help those Afghan who had worked alongside U.S. forces.

The Trump administration had drastically reduced the number of Special Immigrant Visas issued to Afghan allies, and just recently, Trump described Biden's mass evacuation of Afghans as a means to airlifting "terrorists" into "neighborhoods around the world."

MacGregor believes a withdrawal on Trump's timetable would have been less dangerous because it would not have been done during the fighting season in Afghanistan.

He also believes the Taliban would have been much less aggressive with Trump in office, fearing how he would react. But he does not blame Biden for the chaos of the withdrawal.

"I'm glad President Biden made the decision. He is not responsible for the details of the withdrawal," MacGregor said. "That is the job primarily of the secretary of defense -- and General McKenzie and General Milley certainly should have been involved."

And, as MacGregor pointed out, two of the three people responsible -- Milley and McKenzie -- were appointed by Donald Trump.

ABC News Chief Washington Correspondent Jonathan Karl is the author of the forthcoming, "Betrayal: The Final Act of the Trump Show."