A French police officer was saved by his bulletproof vest after he was stabbed in a knife attack in Cannes . Police are investigating whether the attack was a terrorist incident amid reports the assailant said he was acting "in the name of the Prophet" Mohammed. The incident happened on Monday morning when the attacker opened the door of a police car, which was parked in front of a police station in the city in southern France, stabbing the officer at the wheel with a knife. The man then tried to attack a second officer in the car. A third officer then fired his weapon, seriously injuring the attacker. French Interior Minister Gerald Darmanin said the attacker had been "neutralised". "I came to Cannes this morning to give my full support to the police officers who were victims of a violent stabbing attack," Mr Darmanin tweeted. "I want to underline the courage and exemplary coolness of the police officers who neutralized the assailant and avoided the worst." The Algerian citizen held an Italian residency permit and was in France legally and was not on a French watch list of people thought to hold extremist views, the minister said. "I think that we can today sigh with relief that, although they have been hit hard psychologically, no police officer has been injured," Mr Darmanin said. The investigation is in the hands of the local prosecutor for now and not the national antiterrorism prosecutor. Mr Darmanin said it was too early to know the attacker's motive. Cannes mayor David Lisnard said the incident was "sickening". The attack comes as President Emmanuel Macron tries to persuade voters that his government is in control of security and violent crime, six months before elections in which the far right and conservatives pose the biggest challenge to his re-election hopes. The French government in April unveiled a <a href="https://www.thenationalnews.com/world/france-to-introduce-extremism-bill-after-terrorist-attacks-1.1211484">counterterrorism and intelligence bill setting out plans</a> to combat extremism, days after a <a href="https://www.thenationalnews.com/world/europe/french-pm-murder-of-policewoman-an-attack-on-the-nation-1.1209559" target="_blank">French police officer was killed inside a police station</a>. The bill allows the government to track foreign funding of mosques but has been condemned by critics, who see it as stigmatising Muslims. In May, three police officers were attacked in the Nantes suburb of La Chapelle-sur-Erdre. The man entered the police station claiming he had car trouble and then stabbed the first police officer inside the station, took her gun and shot two other officers. He had been on a radicalism watch list.