Authorities and relatives of the miners hugged, climbed a nearby hill, planted 33 flags and sang the national anthem after a probe sent some 2,257 feet (688 meters) deep into the mine came back with the note. "Today all of Chile is crying with excitement and joy," President Sebastian Pinera said.
Where many were beginning to give up hope, the scene above ground became a celebration Sunday night, with a barbecue for the miners' families, roving musicians, lit candles and Chilean flags making the barren landscape seem festive.
The miners' ordeal may have just begun: Rescuers say it could take four months - until around Christmas - to get them out.
The men already have been trapped underground longer than all but a few miners rescued in recent history. Last year, three miners survived 25 days trapped in a flooded mine in southern China, and two miners in northeast China were rescued after 23 days in 1983. Few other rescues have taken more than two weeks.
The miners' survival after 17 days is very unusual, but now that they've made it this far, they should emerge OK, a leading U.S. mine safety expert told The Associated Press.
"The health risks in a copper and gold mine are pretty small if you have air, food and water," said Davitt McAteer, who was assistant secretary for mine safety and health at the U.S. Department of Labor under President Bill Clinton.
For the moment, news that the men even survived a tunnel collapse on Aug. 5 was outshining all other details.
A video camera lowered down the probe shaft showed some of the miners, stripped to the waist in the underground heat, waving happily. But they weren't able to establish audio contact, Pinera told reporters at the scene.
"I saw eight or nine of them. They were waving their hands. They got close to the camera and we could see their eyes, their joy," Pinera said.
Word of the miners' survival was a rush of good news in a country still rebuilding from a magnitude-8.8 earthquake Feb. 27 and its resulting tsunami, which together killed at least 521 people and left 200,000 homeless.
Hundreds gathered, cheering and waving flags, in the capital's Plaza Italia where Chileans traditionally celebrate national victories. Along the great length of Chile, people were glued to television and computer screens as the drama unfolded in live feeds from the remote mine.
"I am OK thanks to God. I hope to get out soon," wrote one of the trapped miners, Mario Gomez. "Patience and faith. God is great and the help of my God is going to make it possible to leave this mine alive."
Gomez, 63, appeared to be aware that it will take a long time for rescuers to reach him and his fellow miners. "Even if we have to wait months to communicate. ... I want to tell everyone that I'm good and we'll surely come out OK," he said.
Mine officials and relatives of the workers had hoped the men reached a shelter inside the mine when the tunnel collapsed the San Jose gold and copper mine about 530 miles (850 kilometers) north of the capital, Santiago. But they had said the shelter's emergency air and food supplies would only last 48 hours.
Rescuers drilled repeatedly in an effort to reach the shelter, but failed seven times; they blamed the errors on the mining company's maps. According to Gomez's note, at least some of those probes were close enough that the trapped miners heard them.
Hopes rose after the eighth attempt early Sunday when they heard hammering sounds and sent down a probe. The miners put their two notes in a plastic bag and tied it to the end of the probe. Pinera triumphantly showed the bag to the crowd above ground and read both notes to the crowd above ground.
Liliana Ramirez couldn't believe it when Chile's mining minister said her husband had sent a note to his "Dearest Lila."
"I know my husband is strong, and at 63, is the most experienced miner who could lead his co-workers," she said. "But no more mining (for him.)"
Gomez wrote that the miners used vehicles for light and a backhoe to dig a canal to retrieve underground water.
The opening that rescuers dug to the miners is not wide enough to haul them out. Rescue equipment brought from outside the country was being assembled Sunday to dig a tunnel 27 inches (68 centimeters) in diameter through which the miners will eventually be brought to the surface.
The hole already drilled will be used to send down small capsules containing food, water and oxygen if necessary, and sound and video equipment so the miners can communicate better with loved ones and rescuers.
This spring 115 Chinese miners were rescued after being trapped for more than a week when workers digging tunnels broke into a water-filled abandoned shaft. The accident killed 38 miners.
Chile's drama months after the earthquake shares some parallels with the 2002 Quecreek Mine accident, in which nine Pennsylvania miners were trapped in a flooded tunnel about 15 miles from where one of the planes hijacked on Sept. 11 crashed some 10 months earlier. Americans cheered as all nine miners were rescued three days later.
Hundreds of workers are using equipment from the United States and Australia in the Chilean rescue.
Chile is the world's top copper producer and a leading gold producer, and has some of the world's most advanced mining operations. But both the company that owns the mine, San Esteban, and the National Mining and Geology Service have been criticized for allegedly failing to comply with regulations. In 2007, an explosion at the San Jose mine killed three workers.
Among his expressions of faith and love for his family, Gomez criticized his employer in the note that the president read out loud to the world, saying "this company has to modernize."
McAteer, the U.S. mine safety expert, said he has been to other mines in the same part of Chile and said the rescue effort - first drilling narrow probes, then the wider shaft - sounds like "the logical thing to do."
Perhaps the biggest threat to the miners now is the stress of being trapped underground for a long period of time.
"There is a psychological pattern there that we've looked at," McAteer said. But "they've established communication with the guys, there are people who can talk them through that."
Given sophisticated drilling techniques and equipment, McAteer predicted the miners may get out more quickly than four months. "Twenty-five hundred feet is not a terribly, terribly big hole to drill," he said. "That's a long period of time. We ought to be able to get them out in a period of weeks, not months."
Associated Press writers Federico Quilodran in Santiago, Chile, Peter Orsi in Mexico City and Michael Warren in Buenos Aires, Argentina, contributed to this report.