NAIROBI — The government of Burundi on Tuesday announced the “unexpected” death of President Pierre Nkurunziza. He was 55.

Nkurunziza had recently agreed to step down after a 15-year rule characterized by brutal crackdowns and economic stagnation. His chosen successor won an election last month that was marred by irregularities. The official cause of death was cardiac arrest.

According to the country’s constitution, the president of the legislature should take control of the government until the inauguration of election winner Évariste Ndayishimiye, set for Aug. 20.

The government’s statement on Nkurunziza’s death said he had been well enough Saturday to assist during a volleyball match in his home district of Ngozi but was admitted to a hospital in a neighboring district Sunday. His condition improved Sunday night but took a sudden turn Monday when he suffered a heart attack.

The statement asked people to remain calm and announced seven days of mourning.

Nkurunziza’s wife, Denise, was airlifted to Nairobi 10 days ago and is being treated for symptoms of the novel coronavirus, according to Kenyan media reports. Health officials in Kenya and Burundi have not commented on whether the president had been tested for the virus.

In the lead-up to last month’s election, Nkurunziza’s government expelled the World Health Organization’s representative in Burundi after he raised concerns about large election rallies. Burundi’s number of confirmed covid-19 cases remains low at 83, but testing for the coronavirus has been extremely limited.

Burundi, a country of 11 million people wedged between Congo, Rwanda, Tanzania and Lake Tanganyika, Africa’s deepest lake, suffered through a 12-year civil war that mirrored some of the dynamics of the 1994 genocide in Rwanda, with which it shares a similar language and ethnic makeup.

A former rebel leader, Nkurunziza took power after the war, which resulted in around 300,000 deaths, but subsequent crackdowns by his government on dissident groups caused hundreds of thousands of people to flee the country.

Nkurunziza extended his hold on power in 2015 in a move seen as unconstitutional by his opponents, and more than 1,200 people were killed by state security forces and a quasi-official militia known as the Imbonerakure during an ensuing uprising, according to the United Nations. Almost all of the 400,000 displaced by the violence remain in camps, mostly in Tanzania.

Nkurunziza was fond of sports and was often pictured playing soccer with his country’s national team. He largely stayed within his offices, however, except during the campaign season, when he commanded massive rallies across the small, landlocked nation.

A law passed in his most recent term assured him a $530,000 payout for stepping down, as well as a luxury villa. More than 70 percent of Burundians live on less than $1 a day, and the vast majority of the country relies on subsistence agriculture.