After nearly three agonizing weeks, 12 soccer players, ranging in age from 11 to 16, along with their 25-year-old coach, were rescued from the Tham Luang cave network in Thailand. They had entered the cave after a soccer game on June 23 to go exploring.

It was a happy ending for them all, but one Navy SEAL, Saman Gunan, died trying to distribute oxygen canisters along the route that took five hours to navigate. The treacherous path to the boys was dark, narrow, and muddy, with strong water currents and little oxygen.

See how difficult the rescue was below, as the kids came out on stretchers.

The Wild Boards coach, Ekapol Chanthawong, and the boys were trapped in the caves after rains from a monsoon flooded the passageways and cut off their escape. Chanthawong apologized to parents in a letter sent up with divers on July 7.

“’To the parents of all the kids, right now the kids are all fine, the crew are taking good care. I promise I will care for the kids as best as possible. I want to say thanks for all the support and I want to apologize to the parents,’ wrote 25-year-old Ekapol Chanthawong, the coach of the Wild Boars soccer team.”

Letters from the boys showed remarkable courage. One boy talked about plans for a birthday party. Another mentioned going out for fried chicken, confident he would escape.

A boy named Mick sent a message of hope to family:

“Don’t be worried, I miss everyone. Grandpa, uncle, mom dad, and siblings I love you all. I’m happy being here inside, the navy SEALS have taken good care. Love you all.”

The kids had to learn the basics of diving in the event that the passageways would flood again during their escape. There was talk of having them stay in the cave system for months until the monsoons were over, but instead, they took the dangerous journey to the top.

Some of the kids were “medically sedated” with anti-anxiety medication, in the hopes that they wouldn’t suffer anxiety attacks. It took three days for all 12 and finally the coach to make it out to safety.

Four kids made it out Sunday. Four others made it out Monday, and the rest were finally free on Tuesday.

Adisak Wongsukchan, the father of one of the boys, 14-year-old Akarat, kept a vigil at the cave site for three weeks, refusing to leave until each of them was delivered to safety. Even after his son Akarat, nicknamed “Bew,” was rescued on Monday and taken to the hospital, he stayed where he was in solidarity with the others trapped in the cave.

“I promised the other parents, the five, I will wait and come out together,” Adisak told CNN. “I’m not going to leave them. We’re going to go together.”

See the happy father talk about it below:

The drawn-out dramatic rescue was followed with nervous anticipation around the globe, as everyone hoped the team would survive. Now the Tham Luang cave complex will become a museum, a living monument to the historic and harrowing rescue.

See more below:

Featured image: Screenshot via YouTube