PARIS — France’s government pushed through Parliament a controversial overhaul of the country’s labor law on Wednesday, the last step of a lengthy legislative process that has split President François Hollande’s Socialist Party less than a year before presidential and legislative elections.

The law, which eases rules for firing, hiring and setting work hours, was one of the most hotly debated and widely protested measures of Mr. Hollande’s term, which began in 2012. For months, angry protesters took to the streets of Paris and other cities for occasionally violent demonstrations against the proposal.

Recent polls show that 70 percent of the public oppose the overhaul. Proponents of the measure say it is essential to reduce the country’s stubbornly high unemployment rate and to make the French economy more competitive.

France is still reeling from the attack that killed 84 people on Bastille Day last week in Nice, and asking whether it could have been avoided and who was to blame. The attack, the third major terrorist assault in France in 19 months, turned the nation’s attention away from what has been one of the most controversial actions taken by Mr. Hollande’s government.