PARIS (Reuters) - President Emmanuel Macron formally signed five decrees overhauling France’s labor rules on Friday, the first major economic reforms since he took power in May.

The new rules, discussed at length in advance with unions, will cap payouts on dismissals that are judged unfair, while also giving companies greater freedom to hire and fire employees and to agree working conditions.

Macron said that the decrees would become law in the coming days, although they do not take effect in practice until further decrees spelling out finer details are signed before the end of the year.

Leaders and members of labor unions opposed to the reform - not all unions are totally opposed - marched through cities across France on Thursday in protest, albeit in much lower numbers than similar protests a week earlier.

The changes to the labor code are the first in a number of reforms Macron has promised with the aim of reinvigorating the economy and bringing down unemployment. There are also plans to amend the unemployment benefits and pension systems, changes that are likely to provoke much more popular unrest.