Mourners packed a church in a rural French town rocked by a deadly Islamist attack for a Sunday service in tribute to the victims, who included a policeman hailed as a hero for offering himself in place of a hostage.

Lieutenant-Colonel Arnaud Beltrame, 44, was shot and stabbed after taking the place of a woman whom Radouane Lakdim had been using as a human shield during his attack Friday at a supermarket in the town of Trebes.

The sleepy town of 5,000, located on the picturesque Canal du Midi, is just five miles from the famed medieval walled city of Carcassone, where a silent march is planned next Saturday, the eve of Easter Day.

The bishop of Carcassonne and Narbonne celebrated the mass in Trebes' Church of Saint-Etienne to honour the four killed and three wounded in the attacks claimed by the Islamic State group.