PURE EVIL: Mohammed Merah, here in video aired on French TV, was shot dead yesterday by raiding cops (above, after the shootout). (Reuters)

(
)

The Muslim fanatic who killed seven people in France was so proud of his unspeakably evil work that he uploaded sickening video to the Internet showing him executing a helpless, terrified 8-year-old girl, officials said.

Mohammed Merah is seen yanking Myriam Monsenego by her hair — then firing a bullet into her head while he holds her.

Officials believe Merah strapped on a camera before each murder and posted the videos on jihadi Web sites, where he believed they would inspire other al Qaeda wannabes.

Myriam was slain outside a Jewish school in Toulouse, where Merah also killed a rabbi and the rabbi’s two young sons.

Merah’s earlier victims were French paratroopers.

Before shooting one soldier, Merah proclaimed, “You kill my brothers; I kill you!” — a reference to France’s military presence in Afghanistan.

Four days later, when he shot two more soldiers, Merah shouted, “Allahu akbar.”

He was killed yesterday after a 32-hour standoff at an apartment building where he was holed up.

“Merah suddenly burst out of the bathroom where he was hiding, armed and firing at police at an extremely fast rate, so fast that it was like automatic-weapon fire,” said French prosecutor Francois Molins.

“He was attacking at police. He continued to move forward, armed and firing, jumping from the balcony until he was mortally hit by return fire.”

Meanwhile, new details emerged about Merah’s 2010 capture in Afghanistan — and the failure of both French and American officials to detain him.

Merah was grabbed by Afghan security forces in Kandahar and turned over to the US Army. The United States “put him on the first plane to France,’’ Molins said.

Pentagon spokesman Lt Col. Todd Breasseale said: “The Kandahari police picked him up a matter of years ago. They detained him. The mechanics by which he was returned to France, we are continuing to investigate.”

Someone, though, was smart enough to report the 23-year-old Algerian-born French citizen to the Department of Homeland Security, which added his name to the “no fly’’ list.

Upon his return to France, he was interviewed by intelligence officials, who released him.

All the while, Merah, a petty criminal on welfare, was ostensibly under surveillance by French intelligence.

“It is impossible to arrest someone just because he has Salafist views,” said French Interior Minister Claude Gueant, referring to Merah’s jihadist sympathies. “Holding a particular point of view is not a crime.”