The rescue of 12 boys and their football coach from a cave in Thailand – in a race against time and the rain – has captivated the world.

But even as the complex rescue was underway, with the safety of the boys far from assured, plans for a Hollywood film were springing into action.

As teams of navy SEALs and cave diving experts from across the globe extracted the boys one by one from Tham Luang cave in Chiang Rai province, Hollywood producers were already on the scene.

American producer, Michael Scott, who travelled to the rescue scene with co-producer Adam Smith to conduct preliminary interviews, told Australian news outlet APP: I see this as a major Hollywood film with A-list stars.

Mr Scott is the managing partner of Pure Flix, an American production company known for its Christian and family friendly films, and based in Scottsdale, Arizona.

The company is understood to be attempting to talk to the boys, their families and the rescuers to gain exclusive rights to tell their story.

The production company is also trying to secure a big name screenwriter for the project.

When asked whether it is too soon to be pursuing such projects, Mr Scott told APP: There’s going to be other production companies coming in so we have to act pretty quickly.

He also said they were applying no pressure on people to talk.

The slowly unfolding saga of the boys’ story lends itself perfectly to a film plot.

The boys – all aged 11 to 16 and players in the Wild Boars football team – were missing for a week, before being found alive, deep within the 10km (6 mile) cave complex.

When they were located 10 days later, alive but trapped on a rocky ledge, footage of the thin but smiling youngsters waving out of the darkness was beamed around the world.

A massive international drive to get them out alive (all-in-all an 18-day ordeal) followed.

The very real threat of approaching monsoon rain, limited oxygen, and the balance between getting the boys out quickly and teaching them the skills they would need to escape safely created tension that could have been written for the big-screen.

And the tragic death of a Thai Navy SEAL, Saman Gunan, 38, who died in the cave during rescue efforts, served to highlight the life-or-death decisions being made at every turn.

Feature films about miraculous rescues aren’t unusual (a film was made about the rescue of 33 Chilean miners trapped for 69 days).

But the cost of special effects for a film based on the Thai rescue are likely to be high due to the need for underwater scenes.

A-list stars will also not come cheap.

While it is not clear who will be the hero of the film, there has been talk of the British divers who first discovered the boys playing a central role.

And of course, now, the safe rescue of all the boys and their coach after an arduous three-day rescue effort has given Tinseltown its perfect Hollywood ending.

Pure Flix have said they hope to start production later this year.

So while the media juggernaut which descended on the small village will now slowly disappear, it is only a matter of time before the spotlight will again be directed towards the boys who miraculously survived their ordeal.

Sky News has contacted Pure Flix for comment.

(c) Sky News 2018: Thai cave rescue: Hollywood producers plan major film