Twenty years, thousands of dead American troops, $2 trillion spent and the war in Afghanistan has ended exactly as it began ā€” with the Taliban running the country and harboring the group that planned the 9/11 attacks.

The fact that this comes just days ahead of the 20th anniversary of the horrific Sept. 11, 2001, attacks undermines the sacrifices made in the war on terror that much more.

Thanks, Joe Biden.

Al-QaidaĀ has reportedly joined the Talibanā€™s efforts to defeat the Afghan resistance in the Panjshir Valley this week, as President Bidenā€™s administration continues to insist onĀ treating the terror groupĀ now in charge of the country (because thatā€™s exactly what the Taliban is) as though it is a legitimate diplomatic partner.

The Saudi Arabian outletĀ Al-ArabiyaĀ reported this week that al-Qaida joined the Taliban in the latterā€™s offensive against forces in Panjshir, where figures from the now-deposed Afghan government are holing up with resistance leaderĀ Ahmad Massoudā€™sĀ forces.

ā€œMilitiamen and remnants of the previous Afghan government gathered in the Panjshir valley after the fall of Kabul on August 15,ā€ the outlet reported.

The region is home to Massoud, son of the late anti-Soviet resistance commander Ahmad Shah Massoud. The junior Massoud said this week he will not surrender the areas still under his control to theĀ Taliban, where armed resistance members have gathered.

He told Al Arabiya this week he believes war is inevitable if the Taliban will not agree to participate in the establishment of a ā€œcomprehensive government,ā€ according toĀ Reuters.

The Taliban andĀ resistance forcesĀ both suffered heavy casualties amid fighting in the Panjshir valley this week after efforts to hold talks broke down, for which each side blames the other.

Earlier this week, as the last of the U.S. forces formally withdrew from Afghanistan, one of former al-Qaida leader Osama bin Ladenā€™s top cohorts wasĀ reportedly spottedĀ traveling in his home province with heavily armed escorts ā€” Taliban flags waving high.

Afghans cheered and posed for selfies with Amin ul-Haq, who once served asĀ bin Ladenā€™sĀ top security chief. This was the first time ul-Haq, who had been in hiding, has been spotted in years, and he appears to be quite cozy with the Taliban.

The Taliban, which harbored al-Qaida as it was plotting theĀ Sept. 11 terror attacksĀ on the U.S., has claimed to have no relationship with the group and Biden has also insisted this is the case ā€” although statements he made to this effect last month earned him a surprising fact check fromĀ CNN.

ā€œLook, letā€™s put this thing in perspective. What interest do we have in Afghanistan at this point, with al-Qaida gone?ā€ Biden said last month.

ā€œWe went to Afghanistan for the express purpose of getting rid of al-Qaida in Afghanistan as well as ā€” as well as ā€” getting Osama bin Laden. And we did.ā€

No, we clearly didnā€™t get rid of al-Qaida, as CNN was forced to clarify.

ā€œBidenā€™s claim that al Qaeda is ā€˜goneā€™ from Afghanistan is false ā€” as his own administration acknowledged soon afterward. Following Bidenā€™s remarks, Pentagon press secretary John Kirby told reporters, ā€˜We know that al Qaeda is a presence, as well as ISIS, in Afghanistan, and weā€™ve talked about that for quite some time.ā€™ā€

Quite apparently, al-Qaida is indeed still a presence in the country, along with theĀ Islamic State groupā€™s Afghanistan affiliate, which reportedly took credit for the suicide bomb attack and mass shooting thatĀ killedĀ as many as 170 Afghans and 13 U.S. service members in Kabul on Aug. 26.

And now, the group appears to be working with the Taliban to target the only people left in Afghanistan who are committed to preventing the new terror regime from maintaining full control of the country.

Biden just all but handed these legions of terrorists the country and thereā€™s no telling where this revived partnership between al-Qaida and the Taliban could go, but one thing is sure: It doesnā€™t bode well for our national or global security.

Can we trust our commander-in-chief to do anything? If the last three weeks have been any indication ā€¦ not at all.