In scenes watched around the world, the 33 men trapped in a collapsed gold and copper mine in San Jose, northern Chile, emerged, one by one, from 69 days in the darkness.
Each had his own story to tell. Here are some of the key moments of the rescue.
The first miner emerges
Florencio Avalos, 31, was the first miner to make the journey from the underground chamber in the collapsed mine towards the surface. He stepped out of the missile-like rescue capsule with a broad smile on his face and embraced his family in emotional scenes.
The second-in-command of the group of 33, he was chosen to make the journey before the others because he was in the best physical condition.
Trapped along with his brother, Renan Anselmo Avalos Silva, it was Florencio who filmed videos to be sent up to the rescuers and relatives while underground.
In the spotlight
Mario Sepulveda burst to the surface with the same energy and enthusiasm he had shown underground, where he helped produce films giving tours of the underground chamber.
His shouts were heard even before the capsule surfaced and, after hugging his wife, he joked with laughing rescuers - handing them souvenir rocks from the mine.
In a news conference after the rescue he thanked his parents for the values they had passed on to him and asked not to be treated like a superstar.
"I was born a miner and I'll die a miner," he said - though many of his countrymen are already predicting a future as a television personality.
Bolivian President Evo Morales flew to the scene to personally greet the only non-Chilean in the group of miners, Carlos Mamani.
Mr Morales promised Mr Mamani a house and different job with social benefits when he got home. One report said Mr Mamani was heard telling the president how nice it was to breathe fresh air and see the stars.
An emotional reunion
Claudio Yanez locked his 26-year-old partner of 10 years, Cristina Nunez, in a minute-long embrace when he emerged, somewhat shakily, from his journey through the rock.
She had told journalists that her first desire was to get married to Claudio, the father of her two daughters.
The 34-year-old was among those who lobbied for cigarettes to be sent down to the miners, expressing his disgust at the nicotine patches initially sent down in their place.
Eventually, authorities agreed and began sending down a small amount of cigarettes each day.
The oldest miner
At 63 and the oldest miner to be among the trapped group, Mario Gomez is a hero to the local community. He first entered a mine aged just 12.
A lifetime spent in mines has left him suffering from silicosis, a lung disease common to miners, and he came up in the capsule wearing a special oxygen mask.
He dropped to his knees after he emerged, bowed his head in prayer and clutched the Chilean flag - only rising when his wife, Lilianette Ramirez, approached him for a second reunion embrace.
Esteban Rojas, 44, was the 18th miner to be rescued. As soon as he was released from the capsule, Mr Rojas knelt, crossed himself and prayed.
Still on the floor, he was greeted and embraced by his partner, Jessica Ganiez, whom he had married in a civil ceremony 25 years ago.
In a video call to Ms Ganiez while still trapped underground, Mr Rojas had promised to give her a church wedding "once and for all" if he got out.
Mistress or wife?
Frenzied speculation about whether it would be the wife or mistress of Yonni Barrios, 50, to greet him on his rescue was finally put to an end when it was his mistress, Susana Valenzuela, who hugged him when he came to the surface.
The two women had exchanged bitter words when they met at one of the public vigils for the miners.
Mr Barrios' wife of 28 years, Marta Salinas, said she had declined an invitation to greet him as he emerged, telling a local newspaper: "I'm glad he's safe, it's a miracle from God. But I'm not going to go and see the rescue. He asked me to, but it turned out he had also asked the other lady and I have decency.
"One thing is clear: it's her or me."
Ariel Ticona and his wife Elizabeth Segovia were reunited moments after the miner reached the surface.
Mr Ticona was the 32nd miner to be brought to the surface. His wife gave birth to a baby girl on 14 September - 40 days into the miners' ordeal. Mr Ticona watched the birth on video. He asked his wife to name their daughter Esperanza - "Hope".
Last miner out
Luis Urzua, 54, also known by the respectful but affectionate title of Don Lucho, was the last miner to leave the chamber. He was the leader of the shift and became known as the man who held the group together when they feared they were lost.
He burst out of the capsule to a shower of confetti, flashbulbs and sirens, to be embraced by President Sebastian Pinera. He told the president: "I hand the shift over to you and hope this never happens again".
President Pinera hailed Mr Urzua for doing his duty and seeing off all his men before "leaving last like a ship's captain".
With hard hats held to their hearts, the pair then led a joyous crowd in singing the national anthem.
The last rescuer
The very last man out was the first rescuer down - Manuel Gonzalez, a rescue expert with Chile's state-owned Codelco copper company. After talking all the trapped miners through their final hours down the mine, he spent 26 minutes underground on his own, before strapping himself into the capsule for its final ride to the surface.
He said how proud he was to see the operation through from beginning to end.
A rock was unceremoniously placed atop the lid of the emergency shaft after Mr Gonzalez became, in all likelihood, the last man to see the inside of the underground chamber which the miners had once feared would be their grave.