Paris (AFP) - A rare rally of police officers against "anti-cop hatred" in France descended into violence as counter-demonstrators smashed and torched a police car, forcing two officers to flee.

Police were demonstrating across France against violence suffered during a wave of protests in recent months, opposing reforms proposed by the deeply unpopular government of President Francois Hollande.

Police say their resources are dangerously stretched as they oversee stepped-up security measures following last year's Islamist attacks and try to ensure safety at increasingly restive protests.

And there was continued unrest at Wednesday's police demo as protesters smashed a police vehicle with iron bars before hurling an explosive device into it, forcing the two officers inside to flee before the car went up in flames.

Paris police chief Michel Cadot said the officers "were in the car when the explosive device was thrown inside", an account that was confirmed by a surveillance video seen by AFP.

A placard was later left in front of the burned-out car that said "free roast chickens", an AFP journalist said.

Cadot described the incident as "particularly shocking" and said it "marked an escalation in the gratuitous and brutal violence" against the security forces.

Prosecutors have opened an investigation for attempted murder, and interior minister Bernard Cazeneuve said four arrests had been made and more were expected to follow.

Police and judicial sources said at least three of those arrested were men aged between 19 and 21.

The incident came as some 300 people defied a ban to march through the streets chanting "Cops, pigs, killers!" as police forced the demonstrators back with volleys of tear gas.

The march took place in the capital's Place de la Republique, the focal point for the youth-driven "Up All Night" movement that sprang from the protests against the Socialist government's controversial reforms.

Officials had banned the counter-demonstration over concerns it would "fuel tensions and seriously threaten public order".

- Frayed relations -

Public support for the police soared after last year's jihadist attacks in Paris, and generally remains high.

Despite the tensions, the French police still scored an enviable 82-percent approval rating in a recent opinion poll.

But relations have frayed following months of near-weekly anti-government protests.

Fuelling anti-police sentiment was a video widely shared on social media in March showing two officers holding up a 15-year-old boy while another punched him.

Around 30 investigations have been opened into alleged police brutality, and left-wing politicians as well as unions have strongly criticised the government for its handling of the protests.

But Alexandre Langlois, head of the police section of the CGT union, said the police's reputation had been "smeared" and officers had become "scapegoats for social anger".

Security was exceptionally tight for Wednesday's demonstration, with some 400 police manning barriers around the square while a few hundred attended the rally.

Over the past two months, some 350 members of the security forces have been injured during protests against the proposed labour reforms, which were forced through the lower house of parliament last week without a vote.

A plainclothes officer was seriously injured after being hit in the head by a projectile at a Paris protest last month.

"You can see why these security forces are a bit exasperated," national police chief Jean-Marc Falcone said Wednesday.

Antoine, 31, one of the officers at the Paris rally, stressed how hard it was to police the recent demonstrations.

"Everything's a bit chaotic and you're put right in the middle of it. You have trouble sometimes knowing who's who, and people blame you.

"They have a go at you physically, they throw Molotov cocktails at you, stones," which could injure or even kill officers, he added.

President Hollande sent a "clear message of support to all police forces during a difficult time", his spokesman said, adding: "A balance must be perfectly preserved between maintaining order and respecting our rights."

Prime Minister Manuel Valls tweeted that to attack the police "is to attack all of us".