A suicide bomber killed at least 25 new recruits inside a police compound in the southern Yemeni city of Mukalla on Sunday in an attack claimed by Islamic State, medical and security sources said.
The victims were queuing up to register when the bomb, which wounded 25 others, went off, the sources said.
It was the second deadly blast in four days to hit the city, a hub for al-Qaeda before the militant group was pushed out last month in an offensive by Yemeni troops backed by a Saudi-led coalition.
In a message on its online news agency Amaq, Islamic State said Sunday's attacker was a "martrydom-seeker" who had detonated his explosive belt. It said around 40 died in the attack.
The city's security director, Mubarak al-Awthaban, who was at a nearby office when the suicide bomber struck the Fowa camp in the southern part of Mukalla, survived, security sources said.
Before being forced out, al-Qaeda militants took advantage of more than a year of war between the Iran-allied Houthis and supporters of the Saudi-backed President Abd-Rabbu Mansour Hadi to carve out a mini-state stretching across much of the southern coast, including Mukalla.
Their militant rivals in Yemen's branch of Islamic State have carried out a series of suicide attacks on all parties to Yemen's tangled conflict.
The growing Islamist militant threat has led the Houthis and the Yemeni government to embark on peace talks now underway in Kuwait.
Saudi Arabia, the UAE and other Arab countries intervened in the war in March 2015 in support of the government, which had been swept into exile by the Houthis.
Al-Qaeda in the Arabian Peninsula (AQAP) and Islamic State view the Arab coalition as a pawn of the West and see the Shi'ite Muslim Houthis as apostates deserving death.
The US military announced last week it had deployed a small number of personnel to Yemen to aid in the fight against AQAP, its first troop presence in the country since the Houthi takeover.