Nur Anisa Rahmadani has to wade through shin-deep seawater to get to her primary school in Pantai Bahagia village on the north coast of Indonesia’s Java island.

Almost every day, the sea, which used to lap the shore a few kilometres away, floods their schoolyard and classrooms – clear evidence of the threat that Java’s sinking coastline poses to millions of people.

Experts say Pantai Bahagia, or “Happy Beach”, and scores of other villages and towns along the shoreline are being inundated because of a grim combination of manmade environmental destruction and climate change.

Roughly 40 per cent of Jakarta is below sea level and a new sea wall has had to be built in a bid to hold back the waves.

Still, large areas in the north of the city are regularly swamped, forcing businesses to pile up sandbags for protection while food stalls feed the hungry with water sloshing around their feet.

Hundreds of kilometres to the east, in the seaside town of Demak, residents prop up their fridges and televisions on concrete blocks to keep them out of the murky water that flows into their homes during high tides.

Some have simply abandoned their homes as the sea creeps closer.

Indonesia, an archipelago of thousands of islands, has about 50,300 miles of coastline, making it particularly vulnerable to climate change.

Sinking shoreline threatens millions in Indonesia – in pictures Show all 10 1 /10 Sinking shoreline threatens millions in Indonesia – in pictures Sinking shoreline threatens millions in Indonesia – in pictures Youths play on a wall surrounded by rising water during high tide at Muara Baru port in Jakarta Reuters/Beawiharta Sinking shoreline threatens millions in Indonesia – in pictures A man rows a makeshift boat to reach his house, isolated by sea water, at Pantai Mekar village in Bekasi, West Java province Reuters/Beawiharta Sinking shoreline threatens millions in Indonesia – in pictures A car lies stranded as rising sea water hits Muara Baru fishing port during high tide in Jakarta Reuters/Beawiharta Sinking shoreline threatens millions in Indonesia – in pictures A man prays on top of his brother’s grave which is inundated by sea water in the Tambak Lorok village of Semarang Reuters/Beawiharta Sinking shoreline threatens millions in Indonesia – in pictures A street vendor pushes a food cart as water rises during high tide at the pier of Kali Adem port in Jakarta Reuters/Beawiharta Sinking shoreline threatens millions in Indonesia – in pictures A child sits in a hammock as his mother cleans mussels in the Cilincing district of Jakarta Reuters/Beawiharta Sinking shoreline threatens millions in Indonesia – in pictures Young people play as sea water rises during high tide at the Kali Adem port Reuters/Beawiharta Sinking shoreline threatens millions in Indonesia – in pictures A man drives a motorcycle through sea water as high tide hits Muara Baru fishing port Reuters/Beawiharta Sinking shoreline threatens millions in Indonesia – in pictures Boat passengers alight amid rising sea water during at Kali Adem port Reuters/Beawiharta Sinking shoreline threatens millions in Indonesia – in pictures A worker floats her motorcycle on styrofoam to avoid sea water during high tide at the Muara Baru fishing port Reuters/Beawiharta

It is also home to more than a fifth of the world’s mangrove forests, which naturally help keep the tides out. But only 3 million hectares of mangroves remain, down from nearly double that three decades ago, according to Wetlands International.

For years, coastal communities have chopped down the mangrove forests to clear the way for fish and shrimp farms, and for rice paddies.

In some places, hundreds of metres of coast that used to be lined with mangroves have now been swallowed up by the sea.

The government has scrambled to work with environmental groups to replant mangroves, build dykes and relocate some people.

But many residents, mostly poor fishermen and vendors, are either reluctant to leave their old family homes or simply have nowhere to go further inland on crowded Java.

“I hope to be able to move, but my family has lived here for decades. Where can I go?” says Udin, a 30-year-old fisherman in Pantai Bahagia, 56 miles east of Jakarta.

Udin says he has had to raise his wooden house higher on its stilts twice in recent years. Nearby, the tides are slowly claiming the village mosque and cemetery.

“Only some of us are aware of the benefits of mangroves. There needs to be more collective responsibility,” Udin says.

Despite the nearly daily flood at her school, 10-year-old Nur and her classmates are undeterred.