A Canadian man was sentenced to 40 years in federal prison on Wednesday for plotting to attack Times Square in New York and the city's subway.

U.S. prosecutors had asked for life in prison, while the defence argued Abdulrahman El Bahnasawy should only receive four or five years and get treatment for mental health and drug addiction problems.

El Bahnasawy, 20, of Mississauga, Ont., pleaded guilty in October 2016 to conspiring with ISIS operatives to commit terrorist acts, which included failed plans to bomb Times Square and the city's subway system, and to carry out mass shootings of civilians at concerts.

Read more: CBC News (Canada)