NAIROBI, Kenya — Burundi’s outgoing President Pierre Nkurunziza died of a heart attack, the government said, announcing a week of mourning.

It said he died at Karusi Fiftieth Anniversary Hospital following cardiac arrest June 8.

Nkurunziza, 55, had attended a volleyball match June 6 and was taken to the hospital after falling sick. He had appeared to recover the following day, but deteriorated before suffering the heart attack. Attempts by doctors to revive the leader were unsuccessful.

Kenyan papers reported the late president’s wife, Denise, had contracted COVID-19 — a disease the president appeared to downplay — and was airlifted to Nairobi for treatment.

Pascal Nyabenda, president of the National Assembly, was sworn in as interim president June 9.

The same day, flags were flown at half-staff for the leader who had ruled the country since 2005.

Nkurunziza’s death came days after people in the largely Catholic East African country elected Evariste Ndayishimiye, a former army general, as his successor. Ndayishimiye is due to take office in August.

On May 26, the head of the bishops’ conference said the election had irregularities, but on June 5, the bishops send a congratulatory message to the president-elect, assuring him of their prayers for the success of his leadership.

Nkurunziza was born in Bujumbura in 1964 and was raised in the northern town on Ngozi. His father was a Catholic, from the Hutu ethnic community, with connections to the royal family, while his mother, a Protestant nurse, was from the ethnic Tutsi.

Nkurunziza’s final five years as president were wracked by turmoil. His controversial decision to run for a third five-year term was rejected as unconstitutional by the country’s Catholic bishops and the opposition.

The bishops had feared the move would further destabilize the country and ignite violence. Two months of protests and a failed coup followed his 2015 reelection; 100 people died during army repression, during which some priests were targeted. Thousands also fled the country.