The last of the 33 miners trapped deep underground in northern Chile for more than two months has been rescued.
Luis Urzua, the shift supervisor who was credited with helping the men survive the first 17 days before rescue teams made contact, was greeted by his family and President Sebastian Pinera.
The six rescuers sent down to assist the miners have all been winched up.
The rescued miners have been taken to hospital. All have severe dental infections, and some have eye problems.
One man has been diagnosed with pneumonia, although his condition is not thought to be serious.
Health Minister Jaime Manalich stressed that all appeared to be in far better condition than expected.
The men had been trapped underground since 5 August, when a rockfall caused a tunnel to collapse.
"They were experiencing a kind of rebirth," President Pinera said in a televised address after Mr Urzua's ascent. "When the last miner exited the depths of the mine, I was moved as every Chilean was."'Mission completed'
The rescue operation began shortly after 2315 on Tuesday (0215 GMT on Wednesday) with a technical expert, Manuel Gonzalez, being lowered down the 624m (2,047ft) shaft.
At the scene
Camp Hope, a rather drab and dry affair in the middle of the Atacama desert, erupted in an explosion of colour and sound the moment the capsule carrying Luis Urzua, the last of the 33 miners to be rescued, broke the surface.
Champagne corks popped, balloons in the red, white and blue of the Chilean flag were released, and a rain of confetti and champagne descended on families, police and journalists alike.
Sisters, mothers, fathers and brothers, everyone hugged and danced in front of the screen relaying the images from the rescue shaft some 500m up the hill. Their shouts of joy carried through the clear and cold night. As has become tradition, they then sang the national anthem, arms interlocked, their T-shirts with pictures of the drill which dug the rescue shaft, soaked in champagne.
Mr Gonzalez was supposed to return to the surface and report on the condition of the rescue shaft, before handing over to a paramedic.
However, a live video feed from the refuge where the miners were gathered showed Mr Avalos getting into the "Phoenix" capsule. He was chosen to lead the way because he was one of the fittest of the miners.
Mr Avalos reached the surface at 0010 (0310 GMT) and was greeted by his family, rescuers, President Pinera and the first lady, Cecilia Morel. Bystanders cheered and clapped, and then started chanting "Chile".
President Pinera, his wife and Mining Minister Laurence Golborne were also waiting at the head of the shaft at 2155 (0055 GMT on Thursday), when the rescue capsule carrying Mr Urzua emerged to jubilant cheers, songs and applause.
The 54-year-old then embraced the president and said: "We have done what the entire world was waiting for. The 70 days that we fought so hard were not in vain."
"We had strength, we had spirit, we wanted to fight, we wanted to fight for our families, and that was the greatest thing."
Mr Pinera replied: "I congratulate you because you did your duty, leaving last like a ship's captain."
"You are not the same, and the country is not the same after this. You were an inspiration. Go hug your wife and your daughter."
He then led the crowd in singing the Chilean national anthem.
Below ground, the six rescue workers held up a banner saying "Mission completed". They will now be winched to the surface.
Those freed earlier were:
- Jimmy Sanchez, 19, the youngest of the group who had only been working at the mine for five months and had been showing signs of anxiety
- Mario Gomez, at 63 the oldest miner, who sent up a letter shortly after the miners were found to be alive, saying that the mining company "has got to modernise"
- Jose Ojeda, whose scribbled note - which read "All 33 of us are safe in the shelter" - informed the world the miners were still alive 17 days after the rockfall that trapped them
- Bolivian Carlos Mamani, the only non-Chilean, who was greeted by his president, Evo Morales
- Mario Sepulveda, who brought a bag of stones from the mine as souvenirs
- Juan Illanes, a former soldier who urged his fellow miners to maintain discipline while trapped
- Claudio Yanez, who became engaged to his partner of 11 years, Cristina Nunez, during the ordeal
- Yonni Barrios, whose wife only found out about his mistress when they both attended a vigil for him
- Edison Pena, who became known as "the runner" because he ran up to 5km (3 miles) a day through the mine tunnels to keep himself fit
- Victor Zamora, not a miner but a driver who had gone underground to repair a vehicle and was trapped by the rockfall
- Omar Reygadas, a bulldozer operator who, after leaving the capsule, knelt on the ground clutching a Bible
- Esteban Rojas, who while underground told his girlfriend of 25 years that he now wanted to marry her
- Jose Henriquez, an evangelical preacher who had the job of keeping up his colleagues' spirits
- Claudio Acuna, one of the "palomeros" who handled packages for the group; he celebrated his birthday down the mine
- Franklin Lobos, a former professional soccer player in a Chilean league who received a signed t-shirt sent to the mine by Barcelona star David Villa
- Richard Villarroel, whose partner Dana Castro is heavily pregnant
- Raul Bustos, whose wife described him as the "luckiest unlucky man on Earth"; he lost his builder's business during Chile's earthquake in February
- Alex Vega, Jorge Galleguillos, Carlos Barrios, Victor Segovia, Daniel Herrera, Pablo Rojas, Dario Segovia, Osman Araya, Samuel Avalos, Carlos Bugueno, Renan Avalos, Juan Aguilar, Pedro Cortez and Ariel Ticona
Following their reunions with relatives, the miners were flown by helicopter to hospital in the nearby city of Copiapo.
Order of rescue
Florencio Avalos (31), Mario Sepulveda (39), Juan Illanes (51), Carlos Mamani (23), Jimmy Sanchez (19), Osman Araya (30), Jose Ojeda (46), Claudio Yanez (34), Mario Gomez (63), Alex Vega (31), Jorge Galleguillos (56), Edison Pena (34), Carlos Barrios (27), Victor Zamora (33), Victor Segovia (48), Daniel Herrera (27), Omar Reygadas (56), Esteban Rojas (44), Pablo Rojas (45), Dario Segovia (48), Yonni Barrios (50), Samuel Avalos (43), Carlos Bugueno (27), Jose Henriquez (54), Renan Avalos (29), Claudio Acuna, (35), Franklin Lobos (53), Richard Villarroel (27), Juan Aguilar (49), Raul Bustos (40), Pedro Cortez (24), Ariel Ticona (29), Luis Urzua (54)
Outside the hospital, barriers have been set up to cope with the crowds of onlookers and journalists.
During their journey to the surface, the miners wore a "bio-harness" designed for astronauts, which monitors their heart rate, breathing, temperature and oxygen consumption.
They were also given sunglasses to protect their eyes from the glare of the desert after more than two months underground.
Earlier, President Pinera told the BBC that it had been a day Chileans would never forget.
"To see the miners coming from the bowel of the mountain to the surface and hug their wives, their daughters with so much emotion and joy has been something. It has proven the value of faith, the value of commitment, the value of teamwork."
Mr Pinera said he hoped people would now associate Chile with the mission to get the miners out, rather than its years of military rule.
He also vowed to change safety standards to protect miners.