A former Guantanamo detainee has issued a warning against the U.S. about "upcoming" attacks and praised the Taliban for their victory in Afghanistan.

Ibrahim al Qosi, 60, started to appear in Al Qaeda videos just three years after his repatriation in 2012. He pled guilty to providing support for terrorism and Al Qaeda in 2010 in exchange for repatriation, Fox News reported.

Al Qosi's most recent video was released on Wednesday by Al Qaeda in the Arabian Peninsula (AQAP). It was 20 minutes long, featuring images of 9/11 and footage of the U.S. military withdrawal from Afghanistan.

He has congratulated the Taliban for their "magnificent victory" of taking control of Afghanistan "that shocked the world." Al Qosi also cited "the Emir of the Faithful" and "Muslims in general."

"They are men whose hands by the grace of Allah alone, buried a third empire in the soil of Afghanistan, and restored the Islamic Emirate of Afghanistan to rule by the Shari'ah of Allah, even if America and its allies hate it," Al Qosi noted.

The former Guantanamo detainee became a senior figure in AQAP after he returned to Sudan and made his way to Yemen.

He has also served Osama bin Landen in different roles before the 9/11 attacks and escaped from Tora Bora Mountains in late 2001 before his capture, The New York Times reported.

Al Qosi was also identified as a member of the Yemen-based group's "war cabinet." He was also the first military conviction of the Obama administration.

READ NEXT: Taliban Executes Public Hanging With a Dead Body Suspended From Crane; Note Says the Hanging Was "Punishment for Kidnapping"

Ibrahim al Qosi Warns America

According to Long War Journal, Ibrahim al Qosi said the greatest loss America has suffered besides its material and human losses, was its reputation and prestige as a superpower, being the most powerful country in the world.

He also argued that if all America learned was that its entry into Afghanistan was a strategic mistake that led to their "shameful defeat," then "this means that they did not learn nor understand the lesson in all its aspects."

He then said that American policy is the real cause of attacks such as 9/11, which was a claim long made by both the Taliban and Al Qaeda.

Bin Laden stated many times that the reason for their disagreement with the U.S. was its support of Israel against the Palestinians.

Al Qosi warned that Al Qaeda still intends to target America. He said the U.S. security is still at risk "as long as you do not comprehend the lesson in all its aspects" and "do not act to remove the reasons" for which the 9/11 events took place.

He added that the U.S. would not "enjoy peace and security even if the "last man in Al Qaeda" is eliminated. 

Al Qosi deepened his threat to the U.S. by saying that the "mujahideen" today are not limited to borders, adding that they can move from any part of the world to execute what they wish to put off "your oppression."

The former Guantanamo detainee has ended his video by quoting Bin Laden and said: "The days and nights will not pass until we take revenge like we did on September 11, Allah permitting."

READ MORE: Taliban Wants Their Own Representative at the United Nations General Assembly

This article is owned by Latin Post

Written by: Mary Webber

WATCH: Taliban Enters Afghan Presidential Palace - From Al Jazeera English