MOGADISHU, Somalia — The death toll in an attack by suicide bombers at a hotel compound in Mogadishu on Friday rose to 25 people, with more than 40 people wounded, Somali officials said Saturday.

The Shabab, a rebel group, claimed responsibility for the attack, saying that the intended targets were government ministers and lawmakers who had gathered at the Central Hotel for a prayer service ahead of a national holiday.

“As soon as the prayers finished, a huge explosion happened,” said Salaad Ali Jelle, a former government minister. “Then another explosion followed at the entrance of the mosque. I jumped over several dead bodies, but I survived.”