A suspected al-Qaeda terrorist died Friday night, just days before he was slated to go on trial in federal court in New York on charges of helping to plan the 1998 bombings outside the U.S. embassies in Tanzania and Kenya that killed 224 people, his lawyer said. Among those killed in the bombings were 12 Americans, including two CIA employees.

Nazih Abdul-Hamed al-Ruqai was diagnosed with advanced liver cancer after U.S. commandos and FBI agents captured him in 2013, outside of his home in a suburb of Tripoli, Libya.

In a letter to the trial judge filed early Saturday, Preet Bharara, the U.S. attorney for the Southern District of New York, said Ruqai, 50, “was taken from the Metropolitan Correctional Center to a New York hospital due to sudden complications arising out of his long-standing medical problems.” Bharara said “his condition deteriorated rapidly.”

An imam was with Ruqai when he died, the letter said.

Ruqai’s attorney, Bernard Kleinman, said his client’s condition had deteriorated significantly in the last month. Kleinman did not know the exact cause of death, and he declined to say more about his client’s final hours.

This file image from the FBI Web site shows Nazih Abdul-Hamed al-Ruqai , an al-Qaeda leader connected to the 1998 embassy bombings in eastern Africa. (AP/AP)

There were questions about whether Ruqai would ever be able to be prosecuted because of his illness. The judge had scheduled jury selection to begin Jan. 12 and refused to separate Ruqai — despite his medical condition — from the other remaining defendant in the case.

Ruqai, also known as Anas al-Libi, was charged with conspiracy to commit murder. Two other men were also accused in the bombing case: Khalid Al Fawwaz, a Saudi, and Adel Abdel Bary, an Egyptian.

Both were extradited from Britain in 2012. Last year, Bary pleaded guilty to terrorism charges. He faces a maximum of 25 years behind bars.

Ruqai had close ties to al-Qaeda and moved to Sudan in 1992 to work for Osama bin Laden, U.S. intelligence officials have said.

While in Sudan, Ruqai was sent to Kenya to conduct surveillance on possible targets for an al-Qaeda operation, according to a federal indictment and former U.S intelligence officials.

Kleinman says his client was innocent and had severed his ties with al-Qaeda well before the 1998 attack.

The FBI declined to comment on Ruqai’s death.

Officials were unaware that Ruqai had cancer when he was apprehended. He was known to be suffering from hepatitis C.