Gunmen killed a priest and five churchgoers during mass in an attack on a Catholic church in Burkina Faso, security sources and a local official said.

“Towards 9am, during mass, armed individuals burst into the Catholic church,” said Ousmane Zongo, the mayor of the northern town of Dablo. “They started firing as the congregation tried to flee.”

The attackers – between 20 and 30 according to a security source –trapped some of the worshippers, Zongo added. “They killed five of them. The priest, who was celebrating mass, was also killed.”

The gunmen then set fire to the church, several shops and a small cafe before heading to the local health centre, which they looted, burning the chief nurse’s vehicle.

“There is an atmosphere of panic in the town,” said Zongo.

“People are holed up in their homes, nothing is going on. The shops and stores are closed. It’s practically a ghost town,” he added.

Security reinforcements were sent from Barsalogho, about 45 kilometres (30 miles) south of Dablo, and were combing the area, a security source said.

The attack came two days after French special forces freed four foreign hostages in the north of the country in an overnight raid that cost the lives of two soldiers.

The operation was ordered to free French hostages Patrick Picque and Laurent Lassimouillas, who disappeared while on holiday in the remote Pendjari national park in Benin on 1 May.

The team also found two other female captives, an American woman and a South Korean.

Burkina Faso has suffered from increasingly frequent and deadly attacks attributed to a number of jihadist groups, including the Ansarul Islam group, the Group to Support Islam and Muslims (GSIM) and Islamic State in the Greater Sahara.

Nearly 400 people have been killed since 2015 – mainly in hit-and-run raids – according to an AFP tally.

Jihadist groups target both Muslim and Christian clerics, mainly in the north.

Former colonial ruler France has deployed some 4,500 troops in Mali, Burkina Faso, Niger and Chad in a mission codenamed Barkhane to help local forces try to flush out jihadist groups.