New York (CNN) -- A Bosnian immigrant who authorities said came within days of carrying out a plot to bomb New York City's subway system was sentenced to life in prison on Friday.
Adis Medunjanin, 34, had been charged with conspiring to use weapons of mass destruction and conspiring to provide material support to al Qaeda. After authorities foiled the plot, he then attempted to crash his car and kill himself and others.
Medunjanin chanted versus in Arabic from the Quran in front of Judge John Gleeson as a part of his statement to the court. He went on in English also criticized the U.S. for wars, hunger and torture.
Medunjanin's immediate family and extended wept as he spoke to the court.
Medunjanin maintained his innocence and denied being involved in the any subway bombing plot.
"Adis Medunjanin was today held accountable for his role in one of the most serious terrorist plots against the homeland since 9/11," said Assistant Attorney General Lisa Monaco.
During the trial, prosecutors said Medunjanin traveled to Pakistan's tribal region with two high school friends, Pakistani-born Najibullah Zazi and Zarein Ahmedzay, an immigrant from Afghanistan.
His friends pleaded guilty to planning the attack with Medunjanin and testified against him.
Robert Gottleib, Medunjanin's attorney, told reporters after the trial that they plan on appealing the verdict.
Prosecutors said Medunjanin sought to join the Taliban, but ended up being recruited by al Qaeda to perform a suicide mission back in the United States.
Upon their return, the three men hatched a plan to rig backpacks with explosives and blow them up.