The gates of the Union Buildings in Pretoria, where former president Nelson Mandela's body lies in state, were closed shortly after 3.15pm on Friday.
After the venue was locked, a few hundred people remained inside, calmly queuing in lines to file past the coffin of South Africa's first democratically-elected president.
The public viewing for the third and final day in which Mandela's body lay in state opened at 8am and are scheduled to continue until 5.30pm.
However, by mid-morning on Friday, the park-and-ride facilities to the seat of government were closed as tens of thousands of people had already made their way to the venue.
Thousands of people still waiting to view Mandela's body almost caused a stampede at the Tshwane Events Centre on Friday afternoon, when they found out they would not get to the venue.
“I received an instruction from national (police headquarters) that no one should be let in, so we closed the gates. People got angry and tried to force their way through... we had to open the gates again to prevent a stampede,” said Colonel Caroline Naidoo, Pretoria West area commander.
A seven-year-old child fell and was almost stood upon by the angry crowd, she said. The child was rescued and did not suffer injuries.
Mandela died at his home in Houghton, Johannesburg, last on Thursday, at the age of 95.
He will be buried in Qunu, in the Eastern Cape, on Sunday. - Sapa