KAMPALA: Ugandan authorities said on Monday 20 people had been detained for questioning about their possible role in the massacre of 42 people, mostly students, on Friday by the Islamist group Allied Democratic Forces (ADF).

"At least 20 suspected ADF collaborators have been arrested, to assist with our investigations," the country's police force said in a statement.

Those detained, police said, included the school's headteacher.

A group of fighters from the Islamic State-linked rebels stormed the Lhubirira Secondary School in Mpondwe, a town on Uganda's border with Democratic Republic of Congo, at around 11:30 p.m. on Friday.

They torched one dormitory that housed boys and entered another where girls resided and begun cutting victims using machetes.

Of the 42 killed in the attack, 37 were students.

The student victims included a 12-year-old girl in her first year of secondary school education, according to police.

Seventeen bodies recovered were burnt beyond recognition and DNA tests are being used to identify the bodies, police said.

"All the 17 burnt bodies were male and the burns were distributed all over the bodies, both front and back. One of the victims had an additional gunshot wound," police said.

ADF was founded in Uganda in the 1990s. For years, the insurgents battled against the government of President Yoweri Museveni from their base in the Rwenzori Mountains which straddle Uganda's border with Congo.

Eventually, Uganda's military dislodged it and the group fled into the dense jungles of eastern Congo where they have over the years been blamed for brutal attacks on civilians.

ADF fighters have occasionally carried out attacks inside Uganda, including bombings in Kampala in 2021.