PARIS -- A civilian employee raged through Paris police headquarters with a knife Thursday, stabbing four police colleagues to death before he was shot and killed, French authorities said.

The man, a technology administrator in the police intelligence unit, launched the attack in his office then moved to other parts of the large 19th century building across the street from Notre Dame Cathedral.

Three of the people he killed were police officers, the fourth an administrator, the Paris prosecutor said.

An officer stopped the attack when he shot the assailant in the compound's courtyard, said a police official. The official was not authorized to talk publicly about the case and requested anonymity.

The employee who carried out the attack had worked for the city's police force since 2003 without ever arousing concerns, French Interior Minister Christophe Castaner said.

"There were no warning signs," Castaner said.

"This man was known inside the computer department, he worked alongside his colleagues and never presented any behavioural difficulties," he added.

Paris prosecutor Remy Heitz said authorities opened a murder investigation, for the moment ruling out a terrorism inquiry.He said the 45-year-old assailant's home was being searched.

Three of the victims were men and one was a woman, Heitz said. A department employee wounded in the rampage underwent emergency surgery Thursday afternoon, Castaner said.

Emery Siamandi, who works at police headquarters, said he was in the stairwell leading to the chief's office when he heard gunshots.

"I told myself, this isn't right," Siamandi said. "Moments later, I saw three policewomen crying. I couldn't help them in any way, and their colleagues were crying, too, so I figured it must be serious."

He said he saw one officer on his knees in tears.

"It's the worst scenario possible, an internal attack with colleagues working together," said Philippe Capon of the UNSA police union.

Capon cautioned against jumping to conclusions on the motive and said, "Nothing can be ruled out, including a personal issue."

French media reported the employee carried out the attack with a ceramic knife.

The attack came a day after thousands of officers marched in Paris to protest low wages, long hours and increasing suicides in their ranks.

President Emmanuel Macron stopped by police headquarters to show solidarity with officers and department employees, his office said.

The neighbourhood where the police compound is located, a busy tourist destination, was locked down, the Cite metro stop was closed and the bridge between Notre Dame and the headquarters building was blocked off.

"Paris weeps for its own this afternoon after this terrifying attack in the police headquarters. The toll is heavy, several officers lost their lives," Mayor Anne Hidalgo tweeted.

Extremists have repeatedly targeted French police in France in recent years. In 2017, a gunman opened fire on the Champs-Elysees boulevard, killing one officer before he was shot to death.

In 2016, an attack inspired by the Islamic State group killed a police officer and his companion, an administrator, at their home in front of their child.

----

This story has been corrected to show the Paris prosecutor said three officers and a police administrator died. A police union official said earlier that four officers were killed.

----

Claire Parker contributed