NEW YORK (CBSNewYork/AP) — The ringleader of a thwarted plot to bomb the New York City subway system was sentenced to Thursday to 10 years in prison – effectively, time served – and is expected to be released in days, his attorney said.

Najibullah Zazi, a 33-year-old naturalized U.S. citizen, 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.

Zazi spent the next 10 years after his arrest helping the government to catch terrorists and prevent death.

“Mr. Zazi, who I ment almost 10 years ago when he was a young man, has changed dramatically and I witnessed that transformation over the past approximately 10 years,” said attorney William Stampur. “He hopefully will be released in a short period of time.”

Federal sentencing guidelines called 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.”

His defense attorney, prosecutors and the judge all seem to agree Zazi has had a complete change of heart and went above and beyond to stop terrorists. Stampur called Zazi’s transformation “extraordinary.”

“Mr. Zazi is extremely appreciative and thankful for what happened today,” Stampur said.

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.

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)