Nelson Mandela buried at Qunu ancestral home
Nelson Mandela's body has been laid to rest in a family plot, after political and religious leaders paid tribute to South Africa's first black president at a state funeral service.
His widow, Graca Machel, and President Jacob Zuma were present for the private, traditional Xhosa burial at Mr Mandela's ancestral home in Qunu.
Mr Zuma had earlier told the larger funeral service that South Africans had to take his legacy forward.
Mr Mandela died on 5 December aged 95.
The last of 10 days of commemorations for Mr Mandela began with his coffin being taken on a gun carriage from his home to a giant marquee where his portrait hung behind 95 candles - each representing a year of his life.
The coffin, draped in the South African flag, was placed beneath a lectern where speakers paid their tributes.
Some guests sang and danced to celebrate Mr Mandela's life as the service began.
After the national anthem, the service heard from a family spokesman, Chief Ngangomhlaba Matanzima, who thanked the army medical team that had treated Mr Mandela before he died.
"A great tree has fallen, he is now going home to rest with his forefathers. We thank them for lending us such an icon."
Close friend Ahmed Kathrada, told mourners he had lost an "elder brother" who was with him for many years in prison on Robben island.
Mr Kathrada's voice filled with emotion as he spoke of the difficulty of recent months and of how he had held his friend's hand the last time he saw him in hospital.
"Farewell my dear brother, my mentor, my leader," he said.
Two grandchildren then addressed the congregation. Ndaba who read an obituary, and Nandi, who spoke fondly of her grandfather as a disciplinarian.
"We shall miss you... your stern voice when you are not pleased with our behaviour. We shall miss your laughter," said Nandi.
Listening to the tributes were Graca Machel and Mr Mandela's second wife, Winnie-Madikizela Mandela. They sat either side of President Jacob Zuma.
Both women were praised for their love and tolerance, in an address by Malawi's President Joyce Banda.
African National Congress members, veterans of the fight against apartheid and foreign dignitaries - including several African presidents and the Prince of Wales - were among the guests.
Archbishop Desmond Tutu - a long-time friend of Nelson Mandela - was also there, as was US talk-show host Oprah Winfrey.
While the service took place, a 21-gun salute sounded far away in Pretoria.
President Zuma, who was booed at last week's stadium commemoration in Soweto, led the service in song before giving his funeral oration.
It had been been a long and painful week, he said.
"Whilst the long walk to freedom has ended in the physical sense, our own journey continues."
An unexpected contribution came from Kenneth Kaunda, 89-year-old former president of Zambia, who lightened the tone of the proceedings by jogging to the stage.
He recounted failed appeals he had made to two South African leaders, John Vorster and PW Botha, for the release of Mr Mandela and his ANC colleagues from prison.
As the political tributes overran, the organisers made an unsuccessful attempt to cut back the religious element of the service.
The master of ceremonies, ANC Deputy President Cyril Ramaphosa, had earlier explained that burial had to take place at midday, in line with the traditions of Mr Mandela's Thembu tribe in Qunu.
"A person of Mandela's stature is meant to be laid to rest when the sun is at its highest and when the shadow is at its shortest."
The BBC's Pumza Fihlani says it was a fitting send-off for a man widely seen as the "father of the nation".
As the state funeral drew to a close, military pallbearers carried the coffin to the grave site for the more private ceremony.
There, a chaplain spoke of Mr Mandela achieving ultimate freedom at the end of a "truly long walk".
George Bizos, another close friend who was part of Mr Mandela's legal team at his 1964 Rivonia trial, was among those who attended the private burial.
"We have known each other for 65 years. Now he is gone," he said.
Three helicopters trailing South African flags then flew over the scene followed by six jets. TV pictures of the grave site came to a close.
British entrepreneur Richard Branson, who attended the burial, said Desmond Tutu told mourners Nelson Mandela "doesn't need a stone - he is in all of our hearts".
The former archbishop was at the private ceremony despite conflicting statements on Friday about whether he had been invited.
According to tradition, the Thembu community were holding a private traditional Xhosa ceremony - including songs and poems about Mr Mandela's life and his achievements.
An ox was due to be slaughtered and a family elder was to stay near the coffin, to talk "to the body's spirit".
'Sad but happy'
The burial brought to an end more than a week of mourning across South Africa.
Tens of thousands of people flocked to the FNB stadium for a public memorial on Tuesday, to hear President Barack Obama and other international leaders pay tribute to Mr Mandela.
Over the next three days, at least 100,000 people saw the former president's body lying in state in Pretoria. Thousands more had to be turned away.
On Saturday, Mr Mandela's coffin was flown from Waterkloof airbase in Pretoria to Mthatha in the Eastern Cape.
A military guard of honour then took the casket on a 20-mile (32km) route to Qunu, where Mr Mandela had wanted to spend his final days.
Crowds waving flags and cheering and singing lined the route, which culminated at the Mandela homestead.