An administrator armed with a knife attacked staff inside Paris police headquarters Thursday, killing three officers and another administrator before he was fatally shot, officials said.

Paris prosecutor Remy Heitz said three of the victims were men and one was a woman. A police union official had said earlier that four officers died.

Heitz did not address the motives of the attacker, who was reportedly 45, but said authorities have opened a murder investigation, for the moment ruling out a terrorism inquiry.

The home of the attacker was being searched and anti-terrorism prosecutors were evaluating the situation, Heitz said, without elaborating on possible motives.

France's interior minister said a wounded police employee was undergoing emergency surgery Thursday afternoon.

Union official Loic Travers said it appeared the attack began in an office and continued inside the large compound across the street from Notre-Dame Cathedral.

The number of people injured was not immediately known.

Travers said the motive is unknown, but the 20-year police employee said to be responsible for the attack worked in the intelligence unit and had not posed known problems until Thursday.

He said he couldn't remember an attack on police officers of this magnitude.

"As we speak, one colleague is dead following a knife attack. Another colleague is in a state of shock … and the person behind the attack has been shot by another colleague," Travers said on BFM TV.

'This isn't right'

Emery Siamandi, who worked 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.

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

French President Emmanuel Macron went to police headquarters to show solidarity and support toward all officers and employees, Macron's office said.

The country's prime minister, interior minister and the Paris prosecutor were also at the scene, but the government had not issued a statement more than two hours after the incident.

Emergency personnel stand beside an air ambulance helicopter on the Pont Marie bridge near the Paris police headquarters Thursday. (Martin Bureau/AFP via Getty Images)

The neighbourhood where the police compound is located, a busy tourist destination, was locked down, the Cité 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 police headquarters. The toll is heavy, several officers lost their lives," Mayor Anne Hidalgo tweeted.

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

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