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.
Nelson 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.
Nelson Mandela’s 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.
The coffin will then be flown to the Eastern Cape ahead of the burial at Nelson Mandela’s ancestral home in Qunu on Sunday.
The funeral will mark the end of a period of commemorations in South Africa since Nelson Mandela died at 95 on December 5.
“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, 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 Nelson Mandela’s coffin for a personal farewell it was enough simply to be there.
WOHMiEgmWZwAt least 158 people have died in Spain's worst flooding disaster in generations. On October…
Google has been fined two undecillion (a two followed by 36 zeroes) roubles by a…
Embarking on a home remodel is an exciting journey, promising enhanced comfort, increased property value,…
The US presidential candidates continued to campaign across key swing states on October 20. Footage…
Elon Musk has said he will give away $1 million a day to a registered…
India and Canada have decided to expel their top envoys along with other diplomats as…