GUANTANAMO BAY, Cuba — Majid Khan, a former Maryland resident accused of conspiring with al Qaeda operations chief Khalid Sheikh Mohammed on a second wave of attacks in the US after 9/11, entered a guilty plea Wednesday at a military commission hearing at Guantanamo Bay Naval Base.

Army Col. James Pohl, the military judge in the case, accepted the plea and formally found Khan guilty on all charges, which included attempted murder in violation of the laws of war and providing material support for terrorism.

Khan, wearing a dark suit and a pink tie, admitted in court to being involved with plots with al Qaeda groups in Pakistan, Thailand and Indonesia, which included the bombing of a Marriott hotel in Jakarta in 2003 that killed 11 and injured dozens more.

He insisted he had never met or spoken to slain al Qaeda chief Usama bin Laden — but Pohl replied that Khan “need not know all the people to be part of a conspiracy.”

Khan reached a plea agreement with prosecutors last week in which he promised to testify against other Guantanamo detainees in exchange for a lighter sentence that will lead to his eventual freedom.

His deal is the first plea agreement the US government has reached with a detainee it classifies as “high value.”

In exchange for the reduced prison term, Khan commitment to testify against Mohammed and four others accused of plotting the 9/11 attacks.

The 32-year-old’s testimony could greatly increase the speed of the trials of the alleged conspirators. Much of the other evidence against the accused 9/11 plotters is thought to be subject to legal challenges for possibly being obtained through illegal interrogation techniques, such as torture.

Pohl said Khan’s sentencing would not be handed down for four years to ensure the admitted terrorist complies with the terms of the plea deal, FOX News Channel reported.

FOX added that Khan cannot be sentenced to a prison term of more than 25 years under the plea agreement.

Khan, who speaks fluent English, told Pohl he was “making a leap of faith” in an attempt to avoid a life sentence.

Khan lived in the suburbs of Baltimore from 1996 until he returned to his native Pakistan in 2002.

After allegedly plotting post-9/11 terror attacks in the US, Mohammed and Khan were captured by Pakistani authorities in 2003 and were subsequently handed over to the CIA.