Mr Kerekou had two spells as president totalling nearly 30 years, first coming to power as the head of a Marxist regime in 1972.
But he then accepted the idea of multi-party democracy and organised elections, which he lost in 1991.
He became the first West African leader to admit defeat in an election.
Current President Thomas Boni Yayi described the former president as a great man and declared a week of official mourning.
Mr Kerekou abandoned Marxism-Leninism as Benin’s official ideology in December 1989.
He was under pressure because of the difficult economic situation and faced a series of protests.
He stepped down in 1991 after losing to Nicephore Soglo in a multi-party poll, but returned to power in 1996 having beaten Mr Soglo at the polls and then went on to win a second and final five-year term in 2001.