Grieving families prepared to bury their dead in western Uganda on Sunday while others desperately searched for loved ones still missing after militants killed dozens of students in a school attack.
Officials say at least 41 people, mostly students, were massacred on Friday in the worst attack of its kind in Uganda since 2010.
Victims were hacked, shot and burned in the late-night raid on Lhubiriha Secondary School in Mpondwe, which lies less than two kilometres from the border with the Democratic Republic of Congo.
Pope Francis offered a prayer on Sunday for "the young student victims of the brutal attack" that has shocked Uganda and drawn condemnation from around the globe.
Ugandan authorities have blamed the Allied Democratic Forces (ADF), a militia based in DR Congo, and are pursuing the attackers who fled back toward the border with six abductees in captivity.
Fifteen others from the community, including five girls, were still missing, said Eriphaz Muhindi, chairman of Kasese district, which shares a long and forested border with DR Congo.
Seventeen victims were burned beyond recognition when the attackers set a locked dormitory ablaze, frustrating efforts to identify the dead and account for the missing.
Muhindi said they had been taken away for DNA testing, a process that could take some time.
"This is a great pain to their families," he told AFP.
Families desperate for news waited all night in the cold outside a mortuary in Bwera, a town near where the attack occurred.
Those able to identify loved ones inside the mortuary embraced and wept as they received the bodies and took them away in coffins for burial.
Others milled about anxiously, still without any information of their relatives.
The government said Sunday it would assist with funeral arrangements and supporting the injured.
Thirty-seven students died in the attack, said Uganda's first lady and education minister, Janet Museveni.
The badly burned bodies of 17 male students were found in their dormitory which was totally destroyed by fire.
Witnesses said they locked the door when they heard gunshots.
Twenty female students tried to run to safety but were hacked to death with machetes.
Investigators said a security guard at the school gate was shot dead as the attackers forced their way in, while three members of the public were also killed.
The African Union, France and the United States, a close ally of Uganda, offered their condolences and condemned the bloodshed.
UN Secretary General Antonio Guterres said: "Those responsible for this appalling act must be brought to justice."
Museveni said the army would track down "these evil people and they will pay for what they have done".
But questions have been raised about how the attackers managed to evade detection in a border region with a heavy military presence.
Major General Dick Olum told AFP that intelligence suggested the presence of the ADF in the area at least two days before the attack, and an investigation would be needed to establish what went wrong.
Uganda and DR Congo launched a joint offensive in 2021 to drive the ADF out of their Congolese strongholds, but the measures have failed to blunt the group's violence.
Originally insurgents in Uganda, the ADF gained a foothold in eastern DRC in the 1990s and have since been accused of killing thousands of civilians.
The Islamic State group has claimed the ADF as its Central African affiliate.
Attacks in Uganda are rare but in June 1998, 80 students were burnt to death in their dormitories in an ADF raid on Kichwamba Technical Institute near the DR Congo border.
More than 100 students were abducted.
Friday's attack is the deadliest in Uganda since 2010, when 76 people were killed in twin bombings in the capital Kampala by the Somalia-based group Al-Shabaab.