With the boys and their coach safe, it was time to appease the 'jao mae tham', the goddess of the Tham Luang cave.

While predominantly Buddhist, many Thais embrace animist beliefs in spirits that live in the forests, trees and caves.

Monks, the boys' families, the rescue commander, military brass and thousands of volunteers gathered to give thanks for the lives saved and to ask forgiveness for the intrusion of pumps, ropes and people as they brought out the Wild Boars soccer team.

Pig heads

Pig heads, chickens, fish and flower arrangements are traditional offerings in Thailand. ( ABC: Brant Cumming )

The families of the rescued boys chipped into buy pigs' heads — a traditional offering — that sat with chickens, fish and flower arrangements.

Narongsak lights candle

Chiang Rai provincial Governor Narongsak Osatanakorn pays tribute to Saman Gunan. ( ABC: Brant Cumming )

Rescue commander Narongsak Ossathanakon lit candles. In the background, a tribute to the former Navy SEAL Saman Gunan, who died while resupplying air tanks in the cave.

Volunteers

Volunteers' contributions played a major role in the rescue effort. ( ABC: Brant Cumming )

Thousands of volunteers helped cook, clean and direct traffic during the 18-day search and rescue, dressed in colours associated with Thailand's king.

Danger sign

The entrance to the 10-kilometre cave system is now blocked off by a new fence. ( ABC: Brant Cumming )

A new security fence has been built, with Tham Luang officially off limits until January. That's well past the end of the monsoon season, but officials are allowing time for the flooded cave to drain.