LEGIAN, Indonesia — The people of Bali have long been of two minds about endangered sea turtles. Some want to save them. Some want to eat them.

But increasingly, the desire to save the turtle is winning out, especially among younger Balinese.

By day, Legian Beach is crowded with tourists from around the world who come for the sand and surf. By night, when the beach is dark and nearly deserted, it becomes a critical habitat for turtles.

Alex Unwakoly, a volunteer from the Bali Sea Turtle Society, was patrolling a stretch of beach across from a five-star hotel one recent night when he spotted an olive ridley turtle that had crawled up on the sand to lay its eggs.

So began a rapid operation to save the turtle’s offspring.

He and a colleague kept a handful of tourists at a discreet distance while the turtle — classified as a member of a vulnerable species — laid its eggs. Other rescuers arrived. And as the turtle crawled back to the Indian Ocean, they dug up the 136 eggs, each about the size of a Ping-Pong ball, then put them in a bucket and took them away to hatch in a safer spot.