Celebrations erupted Wednesday night as the last of the 33 miners trapped in a Chilean mine for more than two months was rescued.

The last man to emerge from the ground was shift foreman Luis Urzua, whose leadership was credited with helping the men endure the initial 17 days after the Aug. 5 mine collapse, during which they had no outside contact.

Sirens and horns blared and people cheered as Urzua arrived in the 190-by-54-centimetre metal capsule that brought the men to the surface.

The last miner to be rescued, Luis Urzua, centre, raises an arm as Chilean President Sebastian Pinera, right, looks on after his rescue from the collapsed mine. ((Alex Ibanez, Chilean Presidential Press Office/Associated Press))

"We have done what the entire world was waiting for," Urzua said to Chilean President Sebastian Pinera after his rescue. "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."

Urzua, Pinera and the rescuers then began singing the Chilean national anthem.

In Canada, Prime Minister Stephen Harper offered congratulations to the rescued miners and their families.

"Today we join the rest of the world in celebrating the best possible outcome: the successful rescue of the miners who returned to their loved ones safe and sound," Harper said in a statement.

Operation went smoothly

As the rescue operation proceeded smoothly Wednesday, the time required to bring the miners up individually from the tunnel where they were trapped more than 600 metres underground took just 25 minutes each.

The operation went so quickly that Urzua was out by 8:55 p.m. ET. Earlier estimates were that it would take until the end of Wednesday to get all the miners out.

Ariel Ticona, the 32nd miner pulled from the mine, will get to meet his new child. His wife gave birth to a daughter, their second, while Ticona was trapped.

Franklin Lobos was the 27th miner brought to the surface. A 53-year-old retired professional soccer player, Lobos kicked a soccer ball given to him after he stepped from the rescue capsule.

Jose Henriquez, a 55-year-old father of two, was the 24th man pulled out. A religious man, he had led prayer groups in the mine and had friends send 33 bibles down the rescue shaft.

A rescuer, left, helps Victor Segovia Rojas after he's brought to the surface at the San Jose gold and copper mine, near Copiapo, Chile, on Wednesday. After all the miners were above ground, the six rescue workers sent down to provide assistance followed them up.

Yonni Barios, 50, was the 21st miner rescued. He had taken a nursing course previously and was known as the doctor down below because he helped so many fellow miners with their health problems.

Over the roughly 70 days the men spent trapped in the mine, Barios took temperatures, administered medications and treated minor skin infections.

Barios hugged his mistress after emerging from the capsule. His wife told a Chilean newspaper she would not be at the mine to greet her husband because she had reportedly found out about his mistress.

Mario Sepulveda Espina, the second miner to reach the surface, told a Chilean television station the ordeal was the hardest thing he has ever faced in his life, but his faith in God got him through it.

"I was with God, and I was with the devil," he said through a translator. "But God won, I held on to God's hand, the best hand, and at no point in time ... did I doubt that God would get me out of there."

The first rescue began at 10:55 p.m. ET Tuesday, when Florencio Avalos, 31, was raised through a shaft while strapped inside the metal capsule, dubbed Phoenix 1.

After weeks of waiting and preparation, it took just 16 minutes to lift him out of the mine.

"His seven-year-old son and his wife were waiting beside the rescue capsule," Connie Watson of CBC News said from Chile.

Miner Osman Araya reunites with his wife Wednesday after becoming the sixth trapped miner to reach the surface of the San Jose mine. ((Hugo Infante/Government of Chile/Reuters)) "Before it got there, the son was just sobbing and sobbing, and that had almost everyone else feeling the same."

Avalos, who often acted as a videographer after officials sent cameras down a tunnel, greeted his family and hugged his rescuers and the Chilean president before being escorted into a medical triage centre set up on site.

"He looked in really good shape," Watson said early Wednesday morning. "It was the start of what's been a very successful process."

The tightly choreographed rescue operation proceeded without any major issues as officials monitored the situation closely as the miners were lifted out one by one.

Panic and stress attacks among the miners were among the rescuers' main concerns, but there were also fears that falling rocks could have wedged the escape capsule in the rescue shaft.

Record survival time

The miners were winched more than 600 metres to the surface through a narrow shaft, which took weeks to drill.

They survived more time trapped underground than anyone on record, and the world was captivated by their endurance and unity as officials carefully planned their rescue.

Before the rescue operation began, crews ran tests by lowering an empty capsule down the shaft and raising it before sending it back down with a rescue worker inside to help prepare the miners for their trip to the surface.

Rescued from mine: Florencio Avalos.

Mario Sepulveda Espina.

Juan Illanes.

Carlos Mamani.

Jimmy Sanchez.

Osman Araya.

Jose Ojeda.

Claudio Yanez.

Mario Gomez.

Alex Vega.

Jorge Galleguillos.

Edison Pena.

Carlos Barrios.

Victor Zamora.

Victor Segovia.

Daniel Herrera.

Omar Reygadas.

Esteban Rojas.

Pablo Rojas.

Dario Segovia.

Yonni Barios.

Samuel Avalos.

Carlos Bugueno.

Jose Henriquez.

Renan Avalos.

Claudio Acuna.

Franklin Lobos.

Richard Villarroel

Juan Aguilar.

Raul Bustos

Pedro Cortez

Ariel Ticona

Luis Urzua View photos and profiles of all 33 rescued miners.

Carlos Barrios, the 13th man rescued, was a part-time miner and part-time taxi driver.

Barrios, 27, said he didn't want to go to work on the day of the collapse because he had a premonition of the disaster, with dreams of rocks falling, according to family members.

Claudio Yanez, a 34-year-old drill operator whose wife proposed while he was stuck underground, was lifted out Wednesday morning, the eighth man to reach the surface.

Mario Gomez, the ninth man to step into the sun after months in the dark, fell to his knees to pray after he stepped out of the capsule.

Gomez, 63, was the oldest man trapped. He has worked as a miner since he was 12 and was considering retirement in November.

The fittest, more stable and experienced miners were the first to be hauled out of the mine because they were best prepared to handle any initial glitches during the rescue, officials said.

The next men winched out of the mine were those who were weak, ill or dealing with psychological issues, officials said.

Doctors had been worried the miners could suffer nausea and heart palpitations during the trip up and were concerned about the risk of blood clotting and heart attacks. Aspirin had been sent down to the men earlier Tuesday to thin their blood.

"The spinning they were worried about — where the men would get nauseous and have heart palpitations — that doesn't seem to have happened," Watson said.

The miners had been given a high-protein liquid diet donated by NASA, designed to keep them from vomiting as the capsule rotated.

FAQs Learn more about the rescue operation.

A video camera in the capsule was used to monitor for panic attacks. Each miner used an oxygen mask and had two-way voice communication.

The men also wore sweaters because of the shift in climate from about 30 C underground to near freezing on the surface after nightfall.

After medical checks and visits with family members selected by the miners, the men were flown to hospital in Copiapo, a 10-minute ride away. Two hospital floors were prepared for giving them physical and psychological exams, and the men will be kept under observation in a ward as dark as a movie theatre.