Farooque Ahmed was sentenced to 23 years in prison Monday immediately after entering his guilty plea as part of a deal with federal prosecutors.

Ahmed, who lives in Virginia, apologized in court for his conduct.

He pleaded guilty to conspiring to provide material support to Al-Qaeda and collecting information for a terrorist attack on a transit facility.

Authorities say Ahmed plotted with people who turned out to be part of a six-month government sting. He allegedly took video of northern Virginia subway stations and suggested ways a bomb could inflict the highest number of casualties.