SANAA, Yemen — A suicide bomber disguised a policemen detonated himself Sunday outside a military base in the southern port city of Aden, killing at least 49 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 bombing by the Islamic State killed more than 50 soldiers nearby.

The attack, which officials said injured more than 50, bore the hallmarks of other assaults by the Islamic State and al-Qaida 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. Sunday 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 of those gathered were told to return Monday.

But many soldiers and policemen 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 last months in Saudi Arabia, though he is now believed to be in Aden.