Burundi's outgoing President Pierre Nkurunziza has died, the government of the central African country announced in a statement posted on Twitter.
The government statement said that Nkurunziza, 56, had died of a heart attack.
Nkurunziza, who has faced accusations of political repression at home and abroad, announced he was stepping down this year after 15 years in office, although the former rebel leader was expected to remain a prominent force in the poor East African country.
He came to power at the end of Burundi's 12-year civil war, which killed 300,000 people and was driven by similar ethnic tensions as the 1994 genocide in neighbouring Rwanda, where Hutu extremists slaughtered 800,000 Tutsis and moderate Hutus.
When he stood for a third time in 2015, opponents said it violated a two-term constitutional limit. His supporters beat, tortured and executed activists, suspected opponents and journalists.
After he foiled an attempted coup, more than 1,000 Burundians were killed in clashes with security forces and more than 400,000 fled abroad. The economy was ruined. Donors cut aid.
Opponents boycotted the 2015 poll, accusing the government of election abuses and rights violations, charges it denied.
In this year's election, Nkurunziza nominated retired army general Evariste Ndayishimiye as candidate for the ruling CNDD-FDD party.
Ndayishimiye won the May vote, which was panned by opposition parties as being fraudulent and lacked international monitors.
Burundi said most election observers would have to undergo a 14-day quarantine. Journalists said they faced constant threat of arrest or attack, and many fled the country, while some civil society organizations have been closed.
The government shut the United Nations human rights office last year after its repeated criticism that the youth wing of the ruling party and security services were torturing, gang-raping and murdering political opponents.
Burundi's courts upheld Ndayishimiye's victory earlier this week, and his swearing-in is scheduled for August.
The government said Tuesday there would be a week of mourning for Nkurunziza's death.