A suicide bomber disguised as a policeman detonated himself Sunday outside a military base in the southern port city of Aden, killing at least 52 soldiers and policemen waiting to collect their salaries, officials said.

The Islamic State claimed responsibility for the bombing in a statement. The carnage comes a week after a nearby bombing by the extremist group killed more than 50 soldiers.

Sunday’s attack, which officials said injured 40, bore the hallmarks of other assaults by the Islamic State and al-Qaeda in the Arabian Peninsula. Both groups have been carrying out bombings and assassinations with regular frequency, seizing advantage of the chaos from nearly two years of conflict that has fractured the country.

“We expect the death toll to rise,” said Ramzi Alfadhli, a spokesman for the Yemeni special forces in Aden.

Hundreds of soldiers and policemen, he said, had arrived about 5 a.m. to line up to collect their salaries in front of the residence of a special forces commander, about 500 feet from the Solaban military base, the site of last week’s bombing. About 1,200 were let in after guards frisked them for weapons, and the rest were told to return Monday.

A suicide bomber killed at least 52 Yemeni soldiers and police Dec. 18 outside a military base. (Saleh Al-Obeidi/Agence France-Presse via Getty Images)

But many soldiers and police officers remained outside, refusing to disperse in the hopes they would get paid, Alfadhli said. About 8 a.m., he said, the bomber walked into the group, wearing a cast on his leg and another on his arm. He was disguised in a traffic police uniform, Alfadhli said, and walked with the help of crutches.

“The explosives were placed under the casts, and once he was inside the crowd, he blew himself up,” Alfadhli said.

The war pits Shiite rebels known as Houthis against the internationally recognized government of Abed Rabbo Mansour Hadi, who was driven out of the capital, Sanaa, last year. Since then, a regional coalition led by Saudi Arabia has been trying to restore Hadi to power.

Aden, where Hadi initially fled, is the de facto capital of his exiled government, but his administration has struggled to control the city where underground militant cells flourish. Hadi has spent many of the past months in Saudi Arabia, though he is now believed to be in Aden.