The mastermind behind the Paris terror attacks was killed Wednesday by police, who also hauled off a half-naked cohort in a predawn raid on their ISIS den.

Authorities also arrested eight other terror suspects, including the man who was wearing no pants or shorts as he was frog-marched from the scene following seven hours of fierce fighting during which special-forces police officers fired 5,000 bullets.

Abdelhamid Abaaoud, a Belgian-born jihadist linked to several previous terror conspiracies, was one of two people killed during the siege in the northern Paris suburb of Saint-Denis, two top European officials told the Washington Post.

The second person killed during the raid was a blond woman identified as Abaaoud’s cousin Hasna Aitboulahcen.

She blew herself up with an explosive vest after screaming out, “Help me! Help me!,” according to the Daily Mail.

The raid by more than 100 heavily armed anti-terror cops, joined by French army forces, thwarted plans by the Islamic extremists to attack Charles de Gaulle Airport and a shopping mall, French media reported.

A Paris prosecutor said five days of investigation and raids since Friday’s attacks had turned up a “total war arsenal,” including Kalashnikov assault rifles, ammunition and knives.

Several cellphones used by the attackers were also recovered, including one found in a trash can outside the Bataclan theater, where 89 concertgoers were slain during last week’s rampage.

That phone held a text message sent on Friday that said: “Let’s go, we’re starting.”

Meanwhile, ISIS threatened to attack New York City in a new propaganda video featuring footage of storefronts in Times Square and Herald Square interspersed with suicide bombers donning explosive belts.

At one point, a fighter holds an explosives trigger as the screen goes black.

The 5½-minute video begins with Islamic extremists praising Friday’s terror spree across Paris, which killed 129 people and injured hundreds more.

It ends with an ominous written message in Arabic and French that says: “What’s coming next will be far worse and more bitter.”

Mayor Bill de Blasio held a press conference Thursday night in Times Square with NYPD Commissioner Bill Bratton and said there was no specific threat against the city.

“We will not be intimidated. We will not live in fear,” Bratton said.

Also Wednesday, surveillance video surfaced showing the terrifying scene when a gunman in a dark T-shirt shot up one of several Paris cafes targeted by the attackers on Friday.

At one point in the clip, posted online by the Mail, a young woman cowers in fear under an outdoor table as the shooter stands over her, points his rifle in her face and pulls the trigger.

But instead of going off, the gun apparently misfires or jams, and the woman incredibly manages to escape with her life.

In other recent developments from the Paris attacks: