France's Socialist government has survived a no-confidence vote in parliament after forcing through a deeply divisive labour law that has made it easier for companies to fire staff.

With 288 votes needed to bring down the government of Prime Minister Manuel Valls, 246 politicians voted in favour of the motion, according to the official count.

Sparking months of street protests and widespread opposition, the controversial bill, which was finally pushed through on Tuesday, retains France's cherished 35-hour working week but allows companies to organise alternative working times.

France's labour reforms: Pro-business or pro-worker?

Those include a working week of up to 48 hours and 12-hour days for temporary periods. In "exceptional circumstances", employees could work up to 60 hours a week.

A no-confidence vote has only succeeded once in France's 57-year-old Fifth Republic: in 1962, when it was used to oust the government of Georges Pompidou.

Al Jazeera's Jacky Rowlands, reporting from Paris, said that among those who voted in favour were a number of Socialist MPs. 

"The votes cast by the rebels within the party are seen as a major blow for the government," she said.

The far-left Front de Gauche party said the goal of the no-confidence vote was not to bring down the government but to torpedo the reform.

New protests called by unions and student groups coincided with the vote and saw secondary-school pupils blocking schools entrances with rubbish bins in Paris, and roads blocked in the western cities of Nantes and Rennes.

'Government must listen'

The hardline General Confederation of Labour (CGT) union has called for weekly rolling strikes at the SNCF state rail company with the head of the CGT union, Philippe Martinez, saying it was "time to move up a gear". 

"The government must listen. Democracy must prevail, within our movement and at the National Assembly," said Martinez.

"By ignoring us, the government will end up hitting a snag."

Protests against the reform started on March 9, culminating in massive demonstrations on March 31 that brought 390,000 people on to the streets, according to an official count. 

France's deeply unpopular President Francois Hollande has just over a year left in office and had been banking on the labour reform as a standout initiative with which to defend his record.

Source: Al Jazeera and agencies