Kenya's long-time opposition leader Raila Odinga was buried in a state funeral in the west of the country on Sunday after days of commemorations attended by tens of thousands.

Odinga died aged 80 on Wednesday in India, sparking an outpouring of grief for a politician who spent years fighting for democracy during the autocratic rule of Daniel arap Moi -- a fight that landed him in jail and forced him into exile.

Thousands of people crowded into the city of Bondo for the funeral, having travelled from all around the country. Military officers saluted as Odinga's coffin was lowered into the ground and trumpets played the Last Post.

RTL

Thousands of people crowded into the city of Bondo for the funeral / © AFP

Days of memorials have already caused five deaths in Nairobi -- three died on Thursday when police opened fire during an event in a stadium. At least two more were killed Friday in a stampede.

But fears of further chaos in Bondo failed to materialise and Sunday's events passed without major incident.

Mourner Grace Auma Lubale, 40, told AFP on Sunday that Odinga had taught Kenyans they must fight for their rights.

"That is why, according to our customs, we had to make sure that we step on the soil where he will be laid to rest, so that our hearts may be contented," she said.

"And we'll miss him, but his legacy will remain in us."

- 'Kingpin' -

Arguably the most important political figure of his generation in Kenya, Odinga served as prime minister from 2008 to 2013, but never succeeded in winning the presidency despite five attempts.

Nevertheless, he outlasted many rivals and is credited as a major player in returning Kenya to multi-party democracy in the 1990s.

Sunday's events began with the public state funeral at Jaramogi Oginga Odinga University, named after Raila Odinga's father.

RTL

Raila Odinga's wife Ida (R) and daughter Rosemary Odinga (C) were at the funeral in Bondo / © AFP

Crowds chanted "Jowi", a local expression symbolising strength and courage, and "Baba", his nickname, which means "father" in Swahili.

They listened for hours to speeches by his family and dignitaries including former Nigerian President Olusegun Obasanjo and Kenyan President William Ruto.

"It's a big blow," said Ruto, who had recently made a political alliance with Odinga and promised to continue working with his party, the Orange Democratic Movement (ODM).

Gladys Wanga, ODM president, said Odinga had "made a clear decision" to work with Ruto.

"That is the last standing instruction that Baba gave us, and as a people and as a party, that is where we will stand," she said.

According to Kenyan media, Odinga was the first person to be honoured with a state funeral without having served as president.

"Nobody appointed him as a kingpin - he proved himself to be a kingpin," said mourner Erick Saunda, 37, a teacher from Kisumu.

"Baba is still in our hearts, no-one can replace him as we speak. Even in the grave, he will still remain our hero."