After nearly a decade of helping federal authorities fight terrorism, the ringleader of a thwarted plot to bomb the New York City subway system finally will be sentenced Thursday.

The afternoon hearing in Brooklyn federal court marks a once unthinkable second chance for Najibullah Zazi (nah-jee-BOO'-lah ZAH'-zee), a 33-year-old naturalized U.S. citizen who became radicalized and received explosives training from al-Qaeda after traveling to Pakistan in 2008.

The terrorist organization recruited Zazi and two others to carry out a "martyrdom operation" on U.S. soil. The mission called for rush-hour suicide bombings on subway lines, timed to occur during the Muslim holy month of Ramadan and the eighth anniversary of the Sept. 11 terror attacks.

The plot, foiled by federal authorities, represented "one of the most serious terrorist threats to our nation" since 9/11, then-Attorney General Eric Holder said.

Federal sentencing guidelines call for Zazi to spend the rest of his life behind bars after his 2010 guilty plea. But prosecutors on Wednesday credited Zazi for his "extraordinary" assistance to authorities over the past nine years, including implicating his two best friends in the subway plot and providing "critical intelligence and unique insight regarding al-Qaeda and its members."

Zazi's cooperation included meeting with the government "more than 100 times, viewing hundreds of photographs and providing information that assisted law enforcement officials in a number of different investigations."

He testified at the 2015 trial of Abid Naseer, a Pakistani national convicted of leading an al-Qaeda plot to bomb a shopping mall in Manchester, England, and against one of his co-conspirators in the thwarted subway plot, Adis Medunjanin, who was convicted and sentenced to life in prison.

"Zazi's assistance came in the face of substantial potential danger to himself and his family," Assistant U.S. Attorney Douglas M. Pravda wrote in the court filing. "By aligning himself with the government against al-Qaeda, Zazi assumed such a risk."

The third man charged in the subway plot, Zarein Ahmedzay, offered similar assistance to federal authorities and was sentenced in December to 10 years — essentially time served.

Zazi's attorney and federal prosecutors declined to comment ahead of the sentencing, which is scheduled for 2:30 p.m. before U.S. District Judge Raymond J. Dearie.