PRETORIA, South Africa — An estimated 100,000 South Africans lined up in Pretoria to view Nelson Mandela in his casket, but about a third of the overwhelming crowd was sent away without being able to file past the bier.

Many of the frustrated mourners fought back tears of disappointment on the third and last day of the revered leader’s lying in state. Mandela’s coffin was taken away by a military guard to 1 Military Hospital in Pretoria. The anti-apartheid icon will be flown Saturday to his rural home in Qunu, Eastern Cape where he will be buried on Sunday.

Hundreds of people cheered and some burst into song when Mandela’s cortege left Pretoria’s Union Buildings, the seat of government, for the last time Friday evening.

“It was amazing,” said Keneilwe Mohapi, who stood with her mother as the impressive motorcade went by. “We couldn’t ask for a more fitting end. It’s an honor to say goodbye to him properly.”

“We’re mourning, but I’m grateful,” the 27-year-old said. “He changed my life.”

Many waited under a hot sun for four or five hours in a line snaking through an open field to busses that would take the lucky ones to see Mandela.

“I feel like I’ve lost a once-in-a-lifetime opportunity,” said 22-year-old student Caiphus Ramushun. “I’m frustrated because I got so close,” he added, saying he was only about 100 people away from making it to the buildings.

“I spent eight hours in line. I came so close to going on. Instead I was turned away,” he said.

Mandela’s body was on display since Wednesday, with larger and larger crowds trying to view it each day. About 70,000 mourners were able to file past the casket Friday, government spokeswoman Phumla Williams said.

But Friday’s surge overwhelmed planners, who were not able to move people through security checkpoints and onto busses quickly enough.

Officials were handing out water to those waiting. The area where people stood in line was so crowded that it became a city-within-a-city: Entrepreneurs set up barbecue grills and sold Mandela memorabilia, including T-shirts imprinted with his smiling face and words: “May he rest in peace.”

Many people said they were bitterly upset and some said the government had done a poor planning job.

“I don’t think this government understands what Mandela means to so many people,” said Ali Ndlovu. “If they understood, they would have given us more than three days. I’m just very disappointed.”