NEW YORK - A New York man was convicted Tuesday of plotting an aborted suicide mission against New York City subways in 2009 - a case that featured the first-time testimony from admitted homegrown extremists about al-Qaeda's fixation with pulling off another attack on American soil.

A jury found Adis Medunjanin guilty of all counts for his role in a terror plot that federal authorities say was one of the closest calls since Sept. 11, 2001.

"This is Terrorism 101," Assistant U.S. Attorney Berit Berger said in closing arguments in federal court in Brooklyn. "The goal of this conspiracy was to kill as many people as possible."

Medunjanin, 27, could be ordered to spend the rest of his life in prison when he is sentenced Sept. 7.

Outside court, U.S. Attorney Loretta Lynch said the conviction demonstrated how U.S. authorities must remain vigilant about homegrown extremism.

"Disaffected youth can be drawn into all sorts of things," Lynch said.

Defense attorney Robert Gottlieb said he disagreed with the verdict and would appeal. But he also said the trial showed that the U.S. court system was the best place to prosecute terror crimes.

The defense had admitted that the Bosnia-born Medunjanin wanted to fight for the Taliban, but it insisted he never agreed to spread death and destruction in the city where his family put down roots.

The plot - financed in part by $50,000 in credit-card charges - was abandoned after one of the admitted plotters, Najibullah Zazi, said he noticed that everywhere he drove in New York, a car followed.

"I think law enforcement is on us," he recalled telling another. Later, he said he told Medunjanin in a text message, "We are done."