This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

NEW YORK — Details were revealed Friday of a thwarted terror plot to detonate bombs in Times Square and the New York City subway system as well as shoot civilians are concert venues in the city last summer, according to the Department of Justice.

Three men allegedly planned to carry out the attack last year in support of the ISIS terror group during the Islamic holy month of Ramadhan, federal officials said Friday, unsealing the details of the case for the first time.

It’s the 23rd terror plot against the city since Sept. 11 that was thwarted by the FBI and NYPD, according to a police spokesman.

Those arrested are: Abdulrahman El Bahnasawy, 19, a Canadian citizen; Talha Haroon, 19, a U.S. citizen residing in Pakistan; and Russell Salic, 37, a Philippine citizen.

El Bahnasawy allegedly bought bomb-making materials and helped to secure a cabin within driving distance of the city where he’d allegedly planned to build the explosive devices, the DOJ said. Meanwhile in Pakistan, Haroon allegedly met with explosives experts and planned to travel to the U.S. to meet with El Bahnasawy to carry out the attack. Salic in the Philippines allegedly wired money to the U.S. intending to financially support the attack.

El Bahnasawy was arrested in Cranford, N.J., on May 21, 2016. He has pleaded guilty to terrorism offenses and is awaiting sentencing. Haroon was arrested in September 2016 in Pakistan, and Salic was arrested in the Philippines in April of this year.

An undercover FBI agent feigning to be an ISIS supporter ready to help the men carry out their violent plan helped to thwart the attack, federal officials said.

Both Haroon and El Bahnasawy allegedly told that undercover officer they’d been in contact with ISIS associates and were working on getting the official sanction to carry out their plan.

During the month of May in 2016, they spoke in detail to the undercover officer about their plans.

“These Americans need an attack,” El Bahnasawy allegedly told the undercover agent, adding that he aspired to “create the next 9/11.”

He sent the undercover agent maps of the subway system and identified which lines to target with their explosives, the DOJ said. He also said they “seriously need a car bomb at times square,” and allegedly expressed a desire to “shoot up concerts cuz they kill a lot of people.”

“[W]e just walk in with guns in our hands. That’s how the Paris guys did it,” he allegedly told the undercover agent.

To that end, El Bahnasawy bought an array of bomb-making materials — including about 40 pounds of hydrogen peroxide, which is the primary ingredient in a powerful explosive commonly used in improvised explosive devices — and shipped it to the undercover agent in the U.S. in mid-May 2016, the FBI said. He’d also bought batteries, Christmas lights, thermometers and aluminum foil to make the bombs.

Haroon allegedly told the undercover agent that the subway system was a “perfect” target, laying out a plan to shoot train passengers, including “women or kids” until they “ran out of bullets,” at which point they’d “let the vests go off,” federal officials said. He allegedly said he’d want to execute the attack as soon as May 30, 2016 — Memorial Day.

“That’s a day that will change history,” he allegedly said.

But Haroon and his accomplices were arrested before any attack could be carried out. They each face a slew of charges, the consequences of which range from 15 years to life in prison.

After pleading guilty, El Bahnasawy is set to be sentenced on Dec. 21. Salic is awaiting extradition from the Philippines, and Haroon is awaiting extradition from Pakistan.