SAN JOSÉ MINE, Chile — With a look of sturdy calm, the first of the 33 miners trapped nearly half a mile underground stepped out of a narrow rescue capsule and onto the surface at 12:11 a.m. on Wednesday, hugging his family, the nation’s president and the workers who helped free him before being carted away on a stretcher, giving a thumbs-up as he left.

The rescue had finally begun.

“I’m so overcome with emotion now, as if I’ve been touched by God,” said Alfonso Ávalos, shortly after his son, Florencio Ávalos, 31, became the first miner to emerge from below. “My boy is finally safe. My boy is finally safe.”

During their more than two months of confinement, the miners and their determination to survive have inspired this country and riveted the world.

Their endurance has begun to pay off. Less than an hour before midnight on Tuesday, a rescue worker stepped into the capsule — named the Phoenix — painted with the red, white and blue of the Chilean flag. A mesh door was closed behind him. Then he descended toward the 33 miners trapped below, as President Sebastián Piñera, who has staked his presidency on rescuing the miners, watched him slowly disappear into the darkness to retrieve them.