NEW YORK (CBSNewYork) — One of three men who plotted terrorist attacks in New York City in the name of ISIS, setting their sights on Times Square, subway stations and concert venues, has been sentenced to 40 years in prison.

Abdulrahman El Bahnasawy, 20, a Canadian citizen, planned to detonate explosive devices in Times Square and the subway system, and shoot people gathered at concerts, according to Southern District of New York U.S. Attorney’s Office.

READ MORE: 16-Year-Old Killed In Double Shooting On Lower East Side, Second Victim In Hospital

El Bahnasawy bought bomb-making materials but was arrested in May 2016 after traveling from Canada to New Jersey to stage the attacks, authorities said. His arrest came following an investigation in which an undercover FBI agent posed as an Islamic extremist.

According to criminal complaints, El Bahnasawy sent the undercover agent an image of Times Square with a smartphone message saying, “We seriously need to car bomb Times Square. Look at these crowds of people!”

READ MORE: NYPD: Jose Ramos, 56, Killed In Cypress Hills Hit-And-Run

In another, El Bahnasawy expressed a desire to “shoot up concerts cuz they kill a lot people. … We just walk in with guns in our hands. That’s how Paris guys did it,” the complaints said.

The complaints did not name the venues.

El Bahnasawy pleaded guilty in October 2016, but the case was sealed while the investigation continued.

MORE NEWS: At Least 1 Dead In Long Island Legionnaires' Disease Outbreak

A U.S. citizen, 19-year-old Talha Haroon, was arrested in Pakistan in 2016. Russell Salic, 37, was arrested in the Philippines last April.