A Thai well wisher puts a poster to pray for boys and their soccer coach who have been trapped since June 23, in Mae Sai, Chiang Rai province, northern Thailand Monday, July 9, 2018. Expert divers Sunday rescued four of 12 boys from a flooded cave in northern Thailand, as a dangerous and complicated operation unfolded amid heavy rain and the threat of rising water underground. (AP Photo/Sakchai Lalit)

A Thai well wisher puts a poster to pray for boys and their soccer coach who had been trapped since June 23, in Mae Sai, Chiang Rai province, northern Thailand. Expert divers rescued the team from a flooded cave as a dangerous and complicated operation unfolded amid heavy rain and the threat of rising water underground.  (AP Photo/Sakchai Lalit)

Thai cave rescue timeline: The dangerous race to bring trapped soccer team home

A Thai soccer team of young boys spent more than two weeks trapped in a cave as rescuers fought heavy rains and depleting oxygen levels to get them out.

By July 10, all 12 players – ranging 11 to 16 years of age – and the 25-year-old coach had been extracted from the cave. The team had to be pulled out over a three day period as Thailand’s annual monsoons flooded the cave, prompting a massive and frenzied search and rescue operation.

Aside from the team, three Thai Navy SEALs and a medic stayed in the cave to help with care, Chiang Rai Gov. Narongsak Osatanakorn said. Workers also labored around the clock to pump water out of the cave.

To get the boys out, experts had to guide them, diving through the cave’s dark, tight and twisting passages.

To get the team out, experts have had to guide them, diving through the cave's dark, tight and twisting passages.

Read on for a timeline of the rescue mission since the team became stuck.

July 18

Members of the rescued soccer team and their coach sit during a press conference discussing their ordeal in the cave in Chiang Rai, northern Thailand, Wednesday, July 18, 2018. The 12 boys and their soccer coach rescued after being trapped in a flooded cave in northern Thailand are recovering well and are eager to eat their favorite comfort foods after their expected discharge from a hospital soon. (AP Photo/Vincent Thian)

Members of the rescued soccer team and their coach sit during a press conference discussing their ordeal in the cave in Chiang Rai, northern Thailand. They are recovering well and are eager to eat their favorite comfort foods after their expected discharge from a hospital.  (AP Photo/Vincent Thian)

The entire team left the hospital where they had been receiving treatments since their rescue.

Doctors said the boys were able to gain about 6.6 pounds on average since they were rescued from the cave. They had lost about an average of 9 pounds while trapped inside the cave.

TERRIFYING DETAILS OF THAI CAVE RESCUE REVEALED BY DIVERS

During a news conference after their release, the boys put on a quick demonstration of their ball-handling skills in a special miniature soccer field set up in a hall.

July 10 

In this photo released by Thailand's Ministry of Health and the Chiang Rai Prachanukroh Hospital, the rescued soccer team members pose with a sketch of the Thai Navy SEAL diver who died while trying to rescue them, Sunday, July 15, 2018, in a hospital in Chiang Rai, northern Thailand. The 12 boys and their soccer coach rescued after being trapped in a flooded cave in northern Thailand are recovering well and are eager to eat their favorite comfort foods after their expected discharge from a hospital next week. (Thailand's Ministry of Health and the Chiang Rai Prachanukroh Hospital via AP)

The rescued soccer team members pose with a sketch of the Thai Navy SEAL diver who died while trying to rescue them.  (Thailand's Ministry of Health and the Chiang Rai Prachanukroh Hospital via AP)

The final four boys and the coach were rescued on July 10, a date officials had hoped would be the final day of rescue efforts. 

A total of 19 divers assisted with the rescue operations on Tuesday, Narongsak said. 

July 9

One of two ambulances leave the cave in northern Thailand hours after operation began to rescue the trapped youth soccer players and their coach, in Mae Sai, Chiang Rai province, in northern Thailand, Sunday, July 8, 2018.  Chiang Rai province acting Gov. Narongsak Osatanakorn, who is heading the operation, said earlier Sunday that 13 foreign and five Thai divers were taking part in the rescue and two divers will accompany each boy as they're gradually extracted. He said the operation began at 10 a.m., and it will take at least 11 hours for the first person to be taken out of the cave. (AP Photo/Sakchai Lalit)

One of two ambulances leave the cave in northern Thailand hours after operation began to rescue the trapped youth soccer players and their coach.  (AP Photo/Sakchai Lalit)

Four boys were rescued from the cave on July 9, bringing the total saved to eight.

An additional four boys and the 25-year-old coach remained in the cave.

THAI SOCCER COACH, 25-YEAR-OLD FORMER BUDDHIST MONK, HAILED 'HERO' FOR KEEPING BOYS ALIVE

One helicopter carried the sixth and seventh boys to be rescued to a hospital, while the eighth boy was transported on another helicopter for medical treatment.

July 8

The team is stranded nearly 3 miles from the cave's entrance.

The first four boys were rescued from the cave on July 8.

The first boy rescued exited the cave at 5:40 p.m. local time, followed by three of his team members shortly after, Narongsak said. The boys traveled 0.62 miles underwater before they reached safety. 

July 6

The body of Saman Gunan, a former Thai navy SEAL who died during an overnight mission, is carried during a repatriation and religious rites ceremony at Chiang Rai Airport in Mae Sai, Chiang Rai province, in northern Thailand Friday, July 6, 2018. The Thai navy diver working as part of the effort to rescue 12 boys and their soccer coach trapped in a flooded cave died Friday from lack of oxygen, underscoring risks of extracting the team. (AP Photo)

The body of Saman Kunan, a former Thai navy SEAL who died during an overnight mission, is carried during a repatriation and religious rites ceremony at Chiang Rai Airport.  (AP Photo)

A former Thai Navy SEAL died after he ran out of oxygen.

Saman Kunan, who was 38 years old, died in the morning after he ran out of oxygen and passed out. Kunan had left the SEALs in 2006 to work at Bangkok’s airport as an emergency rescue officer.

WHAT IS CAVE DISEASE? THAI SOCCER TEAM PLACED IN ISOLATION AS DOCTORS MONITOR FOR INFECTION

A volunteer with the rescue efforts to save those trapped in the cave, Kunan was replacing air tanks along the route to where the soccer team is stranded in order to replenish the air supply in the cave, The Evening Standard reported.

July 2

In this July 3, 2018, image taken from video provided by the Thai Navy Seal, Thai boys are with Navy SEALs inside the cave, Mae Sai, northern Thailand. With heavy rains forecast to worsen flooding in a cave in northern Thailand where 12 boys and their soccer coach are waiting to be extracted by rescuers, authorities say they might be forced to have them swim out through a narrow, underwater passage. The 13 are described as healthy and being looked after by medics inside the cave.(Thai Navy Seal via AP)

In this July 3, 2018, image taken from video provided by the Thai Navy Seal, Thai boys are with Navy SEALs inside the cave, Mae Sai, northern Thailand.  (Thai Navy Seal via AP)

Divers located the missing team on July 2 — more than a week after they had disappeared.

June 23

Twelve young members of a youth soccer team and their 25-year-old assistant coach entered Thailand's Tham Luang Nang Non cave on June 23 after a practice match. They were cut off from exiting the massive cave when a rainstorm flooded the exit.

Fox News’ Benjamin Brown, Melissa Chrise, Edmund DeMarche, Travis Fedschun, Chris Irvine, Katherine Lam and The Associated Press contributed to this report.

Kaitlyn Schallhorn is a Reporter for Fox News. Follow her on Twitter: @K_Schallhorn.