ISTANBUL — Suicide bombers carried out two separate attacks on security forces in Tunisia’s capital early Thursday, killing one police officer and injuring at least seven other people, Tunisia’s Interior Ministry said.

The bombings occurred in rapid succession and shattered a sense of relative calm in Tunis, which had gone eight months without a major militant attack. The Islamic State claimed responsibility for the bombings later on Thursday, saying they were carried out by two of the militant group’s “fighters,” according to a message distributed on social media accounts affiliated with the group.

Separately, Tunisia’s 92-year-old president, Beji Caid Essebsi, was hospitalized on Thursday after what his office said was a “severe health crisis.” 

Officials did not disclose the nature of his illness but sought to tamp down rumors throughout the day that Essebsi had died, on a day already filled with anxiety.

Essebsi, a veteran political figure, became Tunisia’s first freely-elected leader in 2014, after a pro-democracy uprising ended the 23-year dictatorship of President Zine el-Abidine Ben Ali.

Tunisia has largely avoided the chaos that has plagued several other Arab countries in the aftermath of the 2011 Arab Spring revolts, such as Syria and Libya. But Tunisia’s tenuous transition to democracy has been threatened by arguments over how to deal with the crimes of past governments and over the nation’s identity moving forward.

Militant groups, including the Islamic State, have carried out periodic deadly attacks, threatening tourism, a cornerstone of Tunisia’s economy.

On Thursday, the first explosion happened shortly before 11 a.m., when a bomber approached a security patrol on Charles de Gaulle Street near the French Embassy in central Tunis. A police officer was killed. Ten minutes later, another bomber detonated explosives at a security installation in the Qarajani district, the Interior Ministry said.

At least three civilians and several officers were injured in the blasts, according to the ministry. Video purporting to depict one of the attacks showed a group of police officers surrounding a wounded colleague, who appeared to be bleeding from the head.

In 2015, large-scale militant attacks on tourists killed at least 60 people and helped plunge the country into a recession, but such attacks have become increasingly rare.

In October, a female suicide bomber attacked a group of police officers on Habib Bourguiba Avenue, in central Tunis, near the site of one of Thursday’s bombings. 

The attack wounded 20 people, including 15 police officers.

Zakaria Zakaria contributed to this report.