Mandela lying in state ends with final rush from S Africans
Hundreds of South Africans pushed through police lines in a last-ditch bid to see Nelson Mandela lying in state in the capital Pretoria.
They were hoping to be the last of some 50,000 people to pass through the Union Buildings on Friday, where the former president's body has lain.
Officials say at least 100,000 people have visited the venue over the past three days to pay their respects.
Mr Mandela's coffin was taken from the building shortly after doors closed.
The coffin was escorted by a guard of honour to a waiting hearse as military helicopters circled over the city.
The body will remain in Pretoria overnight, and there will be a ceremony at a local air force base on Saturday morning to allow members of the governing African National Congress to say a last farewell, reports the BBC's Peter Biles.
The coffin will then be flown to the Eastern Cape ahead of the burial at Mr Mandela's ancestral home in Qunu on Sunday.
The funeral will mark the end of a period of commemorations in South Africa since the 95-year-old's death on 5 December.
"The third day closed with over 50,000 paying their respects to our national icon and first democratically elected President of our country," the South African government said in a statement.
Shortly before the lying in state came to an end, at 17:45 local time (15:45 GMT), hundreds of people towards the front of the queue pushed through in the hope to be one of the last through the door.
One police officer told the AFP news agency: "There are too many people. The whole of the Republic of South Africa wants to say goodbye."
Many people waited in the line for 11 hours for the chance to see Nelson Mandela's body.
Some were angry more time had not been allowed for this ceremonial; others said even if they could not reach his coffin for a personal farewell it was enough simply to be there.
Nosiswe Maduna and her 14-year-old daughter, who travelled 220km (136 miles) from Senekal in Free State to come to Pretoria, were among thousands turned away on Thursday.
They spent the night in the open at a petrol station and began queuing at 03:00 local time (05:00 GMT) so as not to be disappointed again.
"It was my daughter who said we should sleep here and try again, because she didn't want to go back without seeing him," she told the AFP news agency.
Correspondents who visited the coffin said Mr Mandela's body could be seen through a glass screen, dressed in one of his trademark patterned shirts.
At each end of the casket stood two navy officers clad in white uniforms, with their swords pointing down.
Lt-Gen Xolani Mabangu, from the defence force, said chief mourners among the Madiba clan and Mandela family, as well as senior government officials, would accompany the body as it travels from Pretoria to the Eastern Cape, the South African Press Association reports.
A military guard of honour will welcome the arrival in Mthatha, and the coffin will be placed on a gun carriage and transported to a hearse.
Local people will form a 'human chain' between Mthatha and Qunu as the procession passes. Once in Qunu, the Thembu community will conduct a traditional ceremony.
According to South Africa's Times newspaper, it is not clear whether the Thembu monarch King Buyelekhaya Dalindyebo will be attending the funeral.
According to custom, he should play a central role in the rituals, it reports.
But the king appears to be unhappy about some aspects of protocol and government ministers and Mandela family members have been meeting him to urgently convince him to be there, it says.
A national day of reconciliation will take place on 16 December when a statue of Mr Mandela will be unveiled at the Union Buildings.
On Tuesday, tens of thousands of South Africans joined scores of world leaders for a national memorial service as part of a series of commemorations for Mr Mandela.
The African National Congress (ANC) has apologised for any offence caused by the sign language interpreter who was hired for the memorial service for Tuesday.
Sign language experts said his gestures did not make any sense. But Thamsanqa Jantji has denied being a fraud, and said he had schizophrenia and panicked on stage when he began hallucinating.