France will not give up cartoons, President Emmanuel Macron vowed Wednesday in a homage to teacher Samuel Paty, beheaded for having shown caricatures of the Prophet Mohamed to pupils in a lesson on free speech.

"We will not give up cartoons," Macron told a solemn ceremony at the Sorbonne university attended by the family of the murdered teacher.

The president said Paty was slain by "cowards" for representing the secular, democratic values of the French Republic.

Paty's coffin stood in the centre of the university courtyard, adorned with French flags, as pupils, a friend, and a fellow history teacher paid moving tributes to the 47-year-old father of one.

The ceremony started with the song "One" by Irish rock band U2 played over loudspeakers at the Paty family's request, and ended with applause.

Hundreds gathered outside the Sorbonne University to watch the ceremony commemorating the murdered teacher
Hundreds gathered outside the Sorbonne University to watch the ceremony commemorating the murdered teacher AFP / Bertrand GUAY

Paty was killed on his way home from work after school last Friday by 18-year-old Chechnya-born Abdullakh Anzorov, who published an image of the teacher's severed head on Twitter before he was himself shot dead by police.

Paty became the subject of an online hate campaign after he showed cartoons of the Prophet to pupils in a civics class to elicit debate on freedom of expression.

The same images had unleashed a bloody assault by Islamist gunmen on the offices of satirical magazine Charlie Hebdo five years ago in which 12 people, including cartoonists, were killed.

Macron said Paty was killed "because he incarnated the Republic."

Added the president: "He was killed because Islamists want our future," while vowing "they will never have it."