CHIANG RAI, Thailand — Rescuers in northern Thailand on Sunday extracted four members of a youth soccer team from the cave where they had been trapped for more than two weeks, signaling the final act of a saga that has gripped the world.

Three of the boys were taken to a hospital by helicopter while the fourth was taken by an ambulance, Chiang Rai Gov. Narongsak Osottanakorn said at a news conference Sunday night local time.

"We were faster than expected, more successful than I expected, and everyone is happy," he said.

As efforts ended for the night, the rescue operation chief said they would resume in 10 to 20 hours because workers "used all the oxygen" and needed to reset their air tanks. Based on that timeframe, rescue operations were set to resume at around 7 a.m. Monday (8 p.m. ET Sunday), but when that time arrived it was not clear if the effort had resumed.

Members of the audience broke out in applause when the rescue was announced.

The boys traveled more than half a mile underwater with the first one coming out of the cave at 5:40 p.m. More than 90 divers have been involved in the dive, according to officials.

Helicopters and several ambulances were seen departing from the cave area, though there was no official announcement of whom they were carrying.

The Thai Navy SEALs confirmed on their Facebook page that four of the 12 boys had been rescued.

4 boys now out of #ThaiCaveRescue Ambulances with 3rd & 4th boy just passed my position. They came out 12 minutes apart. First two being treated in hospital. It’s going faster & (so far) better than expected. But it’s still a dangerous operation. — Bill Neely (@BillNeelyNBC) July 8, 2018

As they emerged from the entrance to the cave, the group were being whisked to Chiang Rai Prachanukroh hospital, about 35 miles away.

The eighth floor of the hospital was reserved for the soccer team, the coach and their families — who have maintained a patient vigil by the entrance to the cave while the boys have been underground.

A squad of elite divers from Thailand and around the world entered the waterlogged passageways of the labyrinthine cave network hours earlier to evacuate the members of the Wild Boar soccer team and their coach in an operation dubbed “D-Day” by Osottanakorn.

"Divers will work with doctors in the cave to examine each the kids' health to determine who should get to come out first," Narongsak said in the morning.

President Donald Trump said on Sunday morning that the U.S. "is working very closely with the Government of Thailand to help get all of the children out of the cave and to safety."

"Very brave and talented people!" he said on Twitter.

The rescue effort progressed much quicker than expected, with a reporter at the scene — one of the few allowed access to the site by the cave entrance by Thai authorities — apparently told by rescue teams that lowered water levels (up to nearly a foot since Saturday) had shortened the journey out of the cave and made much of the route walkable.

Some of the children are poor swimmers, prompting earlier warnings that the nearly three-mile journey out of the cave could take as long as two to four days to complete.

“There’s no time limit on the operation,” said the governor. “It depends on the weather. It depends on the water levels. If something changes we’ll stop. But I expect the operation to finish in the next couple of days.”

Trapped but resilient

The 12 boys — ages 11 to 16 — entered the massive cave complex on the frontier of Thailand and Myanmar with their 25-year-old coach on June 23. The group became stranded after torrential monsoon rains caused the system to flood and were missing for nine days before being discovered by two British divers.

The resilience of the boys and their coach captured the imagination of a global audience. Before their discovery, they subsisted by licking drops of water off the cave wall.

The mood lifted after the team was found, but elation at their discovery quickly turned to fear as authorities mulled over several rescue options — all of them fraught with danger.

A daredevil swoop for the team through holes drilled in the ceiling of the chamber was considered. So too was the alternative of keeping the boys and their coach in the cave supplied with provisions until the waters receded.

Elon Musk even got in the act, sending Space X and Boring Company engineers to Thailand to explore ways to help and offering to build a “kid sized submarine” to rescue the teens.

Eventually authorities went with what they deemed to be their most logical option.

Rescue workers are seen at the Tham Luang cave area where 12 boys and their coach are trapped in the Chiang Rai province of Thailand on July 8, 2018. LILLIAN SUWANRUMPHA / AFP - Getty Images

Throughout the drama of the last few days, the group have remained resolute. A series of letters sent out through divers Saturday expressed love to their families, a desire for tasty food and hope that they would survive the ordeal and be out soon.

Anticipation building

Speculation that the long-awaited operation was about to happen had been building since the early hours on Sunday.

Reporters approaching the muddy camp at the entrance to the cave where they have been stationed during the drama along with first responders, rescue workers, officials and a legion of yellow-shirted volunteers, were prevented from entering by police.

The atmosphere was charged with excitement even before the governor made public the decision to act.

In Mae Sai, the town closest to the cave, locals too were cautiously hopeful about the possibility that the boys and their coach may soon be back above ground.

“It seems positive,” said one shopkeeper. “It’s been awful for the boys and their families and everybody in this community is desperate to see them safe and sound.”

The rescue mission was announced on what was otherwise just another gloomy, wet rainy season morning with brooding clouds spitting steady showers.

Weather had always been the key factor in when the rescue bid was launched. A window of relatively dry conditions closed in a deluge of downpours on Saturday evening, and with more heavy rain forecast for the next few days authorities decided they could not afford to wait any longer.

“We have reached peak readiness,” continued the governor. “The meaning of readiness is… perfect weather, water and the kids’ readiness, physical and mentally.”

Optimism was high that the divers could successfully complete their mission and get the groupout of the cave unscathed.

The boys and their coach, meanwhile, were said to be mentally prepared to tackle the fraught journey through the tunnels.

“Finding the boys doesn’t mean we’ve finished our mission. It is only a small battle we’ve won, but the war has not ended," said Narongsak.

"The war ends when we win all three battles — the battles to search, rescue and send them home.”