The brother-in-law of a Sept. 11, 2001, hijacker pleaded guilty Thursday to war-crimes charges during an arraignment at Guantanamo Bay, Cuba.

The military’s chief prosecutor said that Ahmed al-Darbi, 39, will be sentenced in about three and a half years.

As part of a plea deal, Darbi is likely to testify against another high-profile detainee at the facility, U.S. officials said.

“He has pledged to be law-abiding and to cooperate fully and truthfully with authorities,” Brig. Gen. Mark Martins, the chief military prosecutor, said in a statement.

Martins said Darbi could be repatriated to Saudi Arabia to serve out the remainder of his sentence in a prison. He faces between nine and 15 additional years behind bars, the Department of Defense said. The deal has been in the works for weeks as U.S. officials waited for Saudi Arabia to agree to the terms.

Darbi is accused of helping to plan a 2002 attack on a French oil tanker in Yemen that killed a Bulgarian crewman. The Saudi, who was captured in 2002, pleaded guilty to charges of terrorism and attacking civilians, among other war crimes.

He could be a key witness in the case against Abd al-Rahim al-Nashiri, who also has been charged in the bombing of the oil tanker and an attack on a U.S. warship in Yemen in 2000 that killed 17 sailors.

“What took place before the military commission today grants Mr. al-Darbi a measure of certainty that his ordeal will end in the foreseeable future,” Ramzi Kassem, Darbi’s defense lawyer, said in a statement. He “can finally look forward to his reunion with his mother, his wife, and their two children, including the son that Mr. al-Darbi has never met.”

Darbi is the eighth person to be prosecuted successfully in the military commissions at Guantanamo Bay. Six of them were plea deals.

The plea deal is a victory for the commissions, which have been beset by procedural delays and questions about the system’s legitimacy, including efforts to prosecute the group of alleged plotters who carried out the 2001 attacks, led by self-professed mastermind Khalid Sheikh Mohammed.

“This is a win for Darbi, who by pleading guilty to a crime that occurred after he was already locked up illegally in Guantanamo might now have a chance to go home,” said Andrea Prasow of Human Rights Watch. “And it’s a win for the prosecution, who can claim another conviction and a cooperating witness against Nashiri. But it is not a win for justice or the rule of law.”

Martins said the plea deal affirmed that Darbi’s “nearly 12 years of detention as an unprivileged belligerent under the law of war have been grounded in strong legal authority and fact.”

Darbi is married to a sister of Khalid al-Mihdhar, who helped hijack American Airlines Flight 77, which crashed into the Pentagon.

According to U.S. military files disclosed by the anti-secrecy group WikiLeaks, Darbi met Mihdhar in 1996 at a mosque in Saudi Arabia. Two years later, he married Mihdhar’s sister in Yemen.

The files say that Darbi had deep ties to al-Qaeda and spent time with Osama bin Laden in Afghanistan, attending training camps at which he later acted as an instructor.

Prosecutors say Darbi met Nashiri in late 2000 or early 2001 and agreed to work for him. According to the charges, Darbi purchased boats that were intended for an operation to attack the oil tanker, then called the MV Limburg.

Darbi was detained in June 2002. In October 2002, the tanker was bombed using an explosives-laden boat.

Nashiri’s trial is scheduled to begin in September.