The workers were extracted one at a time on wheeled stretchers through 90cm-wide metal pipes pushed through the rock.
Teams of doctors and ambulances were waiting on standby at a makeshift hospital outside the tunnel in Uttarakhand, northern India, to offer immediate help to the men.
The final stage of the operation began on Tuesday morning with rescuers only three metres away from the trapped workers, cutting through the last stretch by hand.
"Work of laying pipes in the tunnel to take out workers has been completed," Uttarakhand state chief minister Pushkar Singh Dhami said on the X, formerly known as Twitter.
He thanked the Hindu deity Baba Baukh Nag Ji, as well as the millions of Indians who prayed for the men and the rescuers.
"Soon, all the labourer brothers will be taken out."
Emergency services in the mountainous state had struggled to free the men, even after bringing in powerful hydraulic augurs to bore into the rock. They had battled drilling machinery breakdowns, bad weather and landslides.
Rescuers had resorted to manual digging, sending in “rat-miners” who work in small spaces, after the drilling machine broke down irreparably on Friday.
The machinery jammed when it hit a steel beam among the debris and rubble.
It had bored through about 47 metres of the approximately 60 metres of rock. Rescuers inserted pipes into dug-out areas and welded them together ready to extract the trapped men.
They workers were first located a week ago through a small opening in the rock and seen on camera in good spirits.
Water and food was passed through the small shaft, keeping the men alive and staving off death from dehydration.