A deranged employee went on a stabbing spree inside Paris police headquarters Thursday, fatally stabbing four officers before being shot dead.

The bloodbath unfolded around 1 p.m. inside the station in Île de la Cité, across the street from Notre Dame Cathedral — putting one of the busiest tourist areas in the City of Lights on lockdown.

The suspect, believed to be a disgruntled deaf administrative employee, managed to grab a firearm before he was gunned down, a police union official told The Telegraph.

The worker apparently flipped out over an ongoing “conflict” with his bosses after working there for more than 20 years, sources told the paper.

“I know this man. He worked in IT and he had long-running problems with his superior,” Christophe Crépin, spokesman for the union France Police Policeman in Anger, told The Telegraph.

“He stabbed her first and then colleagues intervened and were stabbed as well. I am told he then got hold of a firearm.”

The attack came a day after thousands of police officers marched in Paris to protest low wages, long hours and a rise in cop suicides.

Emery Siamandi, who works at the station, said he heard gunshots and then saw a pair of officers come outside crying. A third officer — who Siamandi said shot and killed the assailant — came out on his knees, also in tears.

Union official Loic Travers said the attack appears to have begun in an office and continued elsewhere inside the large police compound.

The employee “has been with us for over 20 years,” Travers said outside the headquarters, according to CNN.

The area around police headquarters was on lockdown and the Cite metro station was shut for security reasons.

Paris Mayor Anne Hidalgo confirmed the deadly attack on Twitter, saying “several police officers lost their lives.”

“Paris is mourning his people this afternoon after this appalling attack on the @prefpolice,” the tweet said.

French President Emmanuel Macron was also at the scene.

With Post wires