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 — The plot out of Sunset Park, Brooklyn on July 31, 1997 could have been a disaster.

Two Palestinian-born men had constructed four pipe bombs, with duct tape wrapped around 10-penny nails and 9mm shells — planning to detonate them at the Atlantic Avenue subway hub, where multiple lines intersect with the Long Island Railroad.

But the plot was foiled in the nick of time.

Thanks to an Egyptian grad student — who was here in the United States for just a few weeks on a diversity visa program — police found out about the plans.

The student, Abdel Rahman Mosabbah, had been staying in a Sunset Park apartment and was horrified when one of the suspects, Gazi Abu Mezer, showed him the explosives and mentioned two suicide bombers who had just killed 16 people in Israel at a market.

“Did you see what happened in Jerusalem?” Abu Mezer reportedly asked the student. “Tomorrow it will happen here.”

Mosabbah left the apartment and told the first police officers he found on the street, two cops with the Long Island Railroad. They took him to the 88th Precinct in Brooklyn, where it took a while to find a translator who could understand him.

Officers from the NYPD’s elite, Emergency Services Unit raided the apartment about 5 a.m. that day. Abu Mezer and his accomplice, Lafi Khalil, struggled with police and tried to detonate the bombs.

That’s when they were shot. They survived and were later convicted, sent to prison for life.

Twenty years later, a bomb did detonate in the subway near the Port Authority bus terminal—after many failed plots—but the explosive was a weak one, strapped to suspect Akayed Ullah, and the pipe bomb wasn’t very effective in its aim to inflict maximum carnage.

In 2004, authorities arrested a 24-year-old Pakistani immigrant, Shahawar Matin Siraj, accusing him of plotting to bomb Herald Square subways close to the time of the Republican National Convention, which was being held in Madison Square Garden that year.

Siraj turned down a plea deal that would have given him a maximum term of ten years in prison. His lawyer argued that a paid, government informant incited rage in Siraj, by showing him photos of American soldiers abusing inmates at the Abu Ghraib prison in Iraq.

Siraj was later sentenced to 30 years in prison.

In 2009, the NYPD and FBI arrested three former classmates from Flushing High School, charging them with planning an attack on New York City subways.

One of them, Najibullah Zazi, was recorded on surveillance in a Colorado beauty supply store buying peroxide to be used in bombs.

Zazi and another plotter were from Afghanistan.

Adis Medujinan, who demanded a trial, was born in Bosnia.

Medujinan tried to escape, when he got wind the FBI was coming to arrest him.

He deliberately crashed his car on the Whitestone Expressway, telling the responding police officers, “We love death more than you love life.”

In 2013, within a week of the Boston Marathon bombing, the FBI and NYPD foiled a plot against an Amtrak train that travels daily between Toronto and New York’s Penn Station.

Al Qaeda under Osama bin Laden had often advocated for transit bombings, and there had been multiple explosions on commuter trains in Madrid, Spain during a single, morning rush hour, exactly 911 days after the September 11th terror attacks in New York City.

Just two months ago, in October, an ISIS-inspired plot to target women and children in subways, Times Square, and concert venues, was thwarted, before it had a chance to really evolve.

The three suspects who were taken into custody had rented a cabin, where they hoped to store the explosives and build bombs.

Now, on a Monday morning rush hour, a bomb that detonated in a subway passage near the Port Authority.

Thankfully, it didn’t work very well. Three commuters received minor injuries.