The authorities attribute the attack, one of the deadliest in years, to the Allied Democratic Forces, an extremist group based in neighboring Congo. A person puts an arm around another person in a grassy area near a military vehicle and several other people. At least 37 people were killed – many of them students – and eight others were wounded when militants with an extremist group attacked a secondary school in western Uganda, the authorities said on Saturday, in one of the deadliest terrorist attacks in the East African nation in years. The group, known as the Allied Democratic Forces, attacked the school on Friday night in Mpondwe, a town near the border with the Democratic Republic of Congo, a police spokesman said on Twitter. During the attack, a dormitory was burned and food in a store was looted, said the spokesman, Fred Enanga. All eight who were wounded were hospitalized in critical condition, he added. Three people were rescued, but six students were abducted, a military spokesman, Brig. Gen. Felix Kulayigye, said in a statement. The attack, which began around 11:30 p.m. on Friday and which the authorities said had been carried out by about five militants, is the deadliest that the Allied Democratic Forces has staged in Uganda since late 2021, when suicide bombers set off coordinated explosions in the capital, Kampala, that killed three people, sowing fears about the group’s reach and posing a vexing challenge for the Ugandan authorities. This weekend’s attack was widely condemned by lawmakers, opposition parties and Western embassies, who called on the government to institute measures to prevent such actions in the future. “We hope that investigations can begin in earnest so that the perpetrators of this crime face justice,” Bobi Wine, a Ugandan musician turned opposition leader, said on Twitter. On Saturday afternoon, photographs and video shared on social media and television showed a heavy military presence near the school as aid workers arrived. General Kulayigye said the chief of the country’s defense forces and the commander of the land forces were expected to visit the area. Uganda’s president, Yoweri Museveni, also instructed officials from the Ministry of Education to visit the school. A truck with men in camouflage sitting on top drives down a dirt road lined with crowds of people. Security forces outside the Mpondwe Lhubiriha Secondary School on Saturday. Assailants kidnapped six of the school’s students and used them to carry the looted food, the military said.Credit…Associated Press The Mpondwe Lhubiriha Secondary School is a private school only miles from the busy border crossing with Congo. The school is about 200 miles from Kampala, in a poor farming community where many families cultivate and sell crops, including maize and cassava. Many of the schools in Uganda, both public and private, have dormitories for boarding students. Photographs and videos from the school on Saturday showed the windows and corrugated roofs of the dormitories blackened with soot. Maj. Gen. Dick Olum, the commander of Uganda’s military operation in Congo, said at a meeting with residents that rebel members had spent two nights in the town before attacking the school. He said that some of the students had been burned or hacked to death, and that government pathologists would carry out DNA tests to identify the charred bodies. Ugandan officials said the army and the police were pursuing the attackers, who had fled toward the Virunga National Park, a thick forest in neighboring Congo that is home to endangered mountain gorillas. The militants used the abducted students to carry the looted food, the military said. The government has deployed planes in the search, General Olum said. He also called on the town’s residents to remain vigilant and report anything suspicious. The fact that this attack happened, the general said, “is a very shameful thing.” Since 2021, the Ugandan government, in conjunction with the Congolese government, has launched an offensive against the Allied Democratic Forces, with the aim of rooting the group out from its bases in eastern Congo. The two governments have provided few details about the military campaign, saying only that air and artillery strikes have weakened the group, which at one point pledged allegiance to the Islamic State.