Police shot and killed the attacker at the scene, authorities said.
Anti-terrorism prosecutor Jean-Francois Ricard will lead the probe. When speaking with the media after the attack, Ricard did not provide any details regarding the suspect’s identity or motive.
One French judicial official revealed that the 37-year-old suspect was born in Tunisia.
Ricard, however, said that several factors led to his office taking over the investigation, such as statements the suspect made during the attack and the fact that he staked out the police station and targeted a police official.
The attack occurred southwest of Paris, in the town of Rambouillet.
According to witnesses, the suspect said "Allahu akbar" during the attack, which means "God is great."
The victim was a 49-year-old administrative employee.
"Police are symbols of the republic. They are France," Valerie Pecresse, president of the Paris region, told reporters at the scene.
French Prime Minister Jean Castex pledged the government’s "determination to fight terrorism in all its forms."
President Emmanuel Macron has already bolstered security around the country after a number of religiously motivated attacks.
An attack in Nice in October 2020 saw three churchgoers beheaded with a knife, after which Macron declared "France is under attack." He described the incident as an "Islamist terrorist attack."
"If we are attacked once again it is for the values which are ours: the freedom, for this possibility on our soil to believe freely and not to give in to any spirit of terror," Macron said at the time. "I say it with great clarity once again today: we won't surrender anything."
Weeks before that, middle school teacher Samuel Paty was beheaded by a man of Chechen origins near Paris. The 18-year-old suspect, who was killed by police after the incident, had said he wanted to punish Paty for showing pupils cartoons of the Prophet Mohammad in a civics lesson of free speech, Reuters reported.
The caricatures had been originally published by Charlie Hebdo and were cited by men who attacked the newspaper in 2015.
The Associated Press contributed to this report.