DHAKA (Reuters) - A court in Bangladesh sentenced seven militants to death on Sunday after finding them guilty of killing a shrine worker in 2015, court officials said.

Bangladesh, a Muslim-majority country of 160 million people, is facing what appears to be a growing threat of militant violence and has seen a string of incidents in recent years.

Shrine caretaker, Rahamat Ali, 60, was hacked to death in November 2015 in the northern district of Rangpur. Six others accused of the attack were acquitted by the court.

The convicted men were members of the Jamaat-ul-Mujahideen Bangladesh group, public prosecutor Rathish Chandra Bhowmik told reporters.

Police believe the same group, which has pledged allegiance to Islamic State, was responsible for the most recent serious attack, when gunmen stormed a restaurant in the diplomatic quarter of Dhaka in July 2016, killing 22 people, most of them foreigners.

Islamic State and al Qaeda have claimed a series of killings of liberals and members of religious minorities in Bangladesh in the past years.

Authorities have consistently ruled out the presence of such groups, blaming domestic militants instead. However, security experts say the scale and sophistication of the restaurant attack suggested links to a wider network.