An American has been charged with the attempted murder of two Paris police officers in a violent attack on their car during a protest.

Authorities said the 27-year-old American, whose identity was not released , was one of several masked protesters who kicked and smashed in the car's windshield and a side window, punched the driver, and hurled an incendiary device to torch the vehicle with the two officers still inside.

The violence of the attack has shocked the French. In a video of the confrontation, one bystander appears to attempt to intervene on behalf of the male officer as protesters come at him when he exits the car. The officer was taken to a nearby hospital for treatment of his injuries after fighting off his assailants. His female partner was less seriously injured.

Protesters claim police instigated the clashes by using tear gas, water cannons, batons and pepper spray.

France's Prime Minister, Manuel Valls, vowed "unrelenting" punishment for the rioters that attacked the car. Five protesters, including the American, were quickly arrested. The other four - who are thought to be members of an anti-fascist group - have also been charged with attempted murder, France 24 reports.

"The rule of law is our most valuable asset and the sanctions must be unrelenting," Valls said in a radio interview, adding that the rioters wanted "to kill a cop."

The American has admitted to attending at the protest on Wednesday 18 May, but has denied participating in any violence, officials told the Associated Press. Investigators say he hurled a post at the windscreen of the car during the attack.

He was charged with attempted voluntary manslaughter of a person holding public office, destruction of property, group violence and participating in a masked armed group. He is currently in custody.

Authorities said he is unemployed and was staying with friends in France. There was no comment from the American embassy in Paris.

The attack by counter-demonstrators in Paris occurred as French police around the country were holding unusual protests of their own to denounce violence during demonstrations against proposed cuts in worker benefits.