• 'All 33 of us are well', says message • It will take 'at least 120 days' to free them

A group of Chilean miners trapped for 17 days deep inside a collapsed mine are alive, the Chilean president, Sebastián Piñera, said tonight – but it will take at least four months to set them free.

A rescue probe that drilled down 2,257 feet (688 metres) to the bottom of the San Jose mine made contact with the miners, who sent back a message reading: "All 33 of us are well inside the shelter."

"Never have so few words brought such happiness to an entire nation," said Piñera as he read out the handwritten note.

A second note from the miners indicated they were living in a makeshift refuge. Using a bulldozer, they have created a canal of fresh water and have used electricity from a truck engine to rig up lighting deep inside the notoriously dangerous copper mine.

Aides to Piñera warned that it would take a minimum of four months to free the men. "A shaft 66cm in diameter will take at least 120 days," said Andre Sougarret, lead engineer on the rescue operation. Rescue equipment from around the world is being rushed in to build an escape tunnel nearly 700 metres underground.

The miners were trapped on 5 August by a massive collapse in the roof of the mine, located outside the northern Chilean city of Copiapó. For two weeks, a series of probes has tunnelled hundreds of metres trying to find the refuge where the miners were thought to be gathered. They repeatedly missed their mark, and officials began blaming the mine for not operating with updated maps or modern safety equipment.

Using the hole created by the probes, rescue workers now plan to send down food, medicine and water as doctors struggle to keep the men alive and healthy while mining experts debate the options for building an escape route.

From the day the mine collapsed, dozens of relatives staked out what they call Camp Hope near the mouth of the mine, where they have built shrines, composed songs and ridden a spirit of national unity in hope that rescue efforts would arrive in time to save the men.

"I can't believe it," said Lilian Ramirez, wife of Mario Gomez, who wrote one of the notes. "Though we know he is strong. He has been a miner since he was 12 years old … I told him several times that he must retire from mining."

"God is great," wrote 63-year-old Mario Gomez, the eldest of the trapped miners, in a letter to his wife which Piñera read on television. "This company has got to modernise," Gomez added. "But I want to tell everyone I'm OK, and am sure we will survive."

As the world's leading copper producer, Chile has seen a boom over the past decade as rising copper prices filled the government's coffers and allowed it to ride out the global recession. Record copper prices also meant older mines with deteriorating infrastructure became valuable again. The San Jose mine had been closed twice for safety violations and multiple fatalities. Family members of the trapped miners reacted with joy at the news that their loved ones were alive.