Gabriel Attal promised to be bold and act fast to help the middle class weather the rising cost of living, after President Emmanuel Macron, seeking to breathe new life into his second term, on Tuesday made him France's youngest ever prime minister.

The appointment of Attal, 34, a popular and media-savvy rising star of French politics, signals a desire by Macron to move beyond divisive reforms and improve his centrist party's chances in European Parliament elections in June.

"Dear @GabrielAttal, I know I can count on your energy and your commitment to implement the project of revitalisation and regeneration that I announced," Macron wrote on social media after appointing Attal, a close ally and former minister and government spokesman.