BEIRUT, Lebanon — A fiery double suicide bombing terrorized a mostly Shiite residential area of southern Beirut on Thursday, ripping through a busy shopping district at rush hour. The Lebanese Health Ministry said at least 43 people had been killed and more than 200 wounded in the worst attack to strike the city in years.

The Islamic State extremist group, which controls parts of neighboring Syria, claimed responsibility for the attack. The group portrayed its motives as baldly sectarian, saying it had targeted Shiite Muslims, whom it views as apostates. It mentioned almost as an afterthought that it had targeted Hezbollah, the Shiite militant organization that backs the Syrian government in the civil war raging next door.

Hezbollah maintains tight security control in the district that was hit, and the bombing seemed aimed at hurting the group by attacking civilians in an area where it has many supporters. But the stricken area also typifies working-class Beirut, where Palestinians, Christians and Syrian refugees (mostly Sunnis) live, work and shop.

While Beirut has endured such attacks periodically, the assault shattered a relative calm that had prevailed in recent months. It also showed Lebanon’s vulnerability to the vindictive wrath of the Islamic State.