A former college student in New York admitted in court he conspired to help al-Qaida get what prosecutors described as military gear.

The admission by former Brooklyn College student Syed Hashmi, 30, was part of a plea agreement reached the day before he was to go to trial Wednesday in U.S. District Court in New York on charges of conspiring with others to provide the terrorist group with military items to be used against U.S. forces in Afghanistan, The New York Times reported.

15 years in prison for the former Pakistani. Three other charges were dropped as part of the deal.