If you're a surfer, and there’s a clue in our website name, you might know the northwestern Costa Rican regions of Guanacaste and Puntarenas for their waves. The Pacific Coast surf hubs and famed spots of Tamarindo, Witch’s Rock, Nosara and Santa Teresa, hoover up the dry season’s southwest swells, and fan them with the easterly trade offshore winds. The wet season ain’t bad either.

However, what you may not know is that this region is also undertaking an ambitious project to transform its coastline. By restoring a continuous belt of coastal forest that, over time, will be self-sustaining, it could, or should, serve as a blueprint for swathes of coastline all over the world.

It’s part of the Central American Biological Corridor project. Since 2018, 10,000 native trees covering 23 hectares have been planted across several coastal sites in Puntarenas and Guanacaste. It has formed a transition zone where beaches, dunes, mangroves, and lowland forests interact to provide habitat for biodiversity.

The natural vegetation and barriers in Costa Rica had been removed over time. It’s a process that has been repeated all over the world. In high-profile surf towns like Buxton on the Outer Banks and South Narrabeen in Sydney, it was due to housing and development having been built on, or near, surf zones. As climate change and erosion take hold, protective seawalls or man-made structures were built to protect the properties. These, however, have only added to the erosion, making for an endless, expensive and destructive cycle.

View this post on Instagram

In Puntarenas and Guanacaste, the historic forest cover was cleared primarily for cattle ranching. The open areas were then dominated by invasive grasses, which blocked any return of natural regeneration.

The new corridor project saw the invasive grasses removed, and around 50 species of native trees planted in high-density triangular cluster plantings. This is a method that accelerates ecological succession, the predictable, gradual process by which ecosystems change and develop over time in a self-sustaining mature community. These will then link with an inland network of wildlife corridors to add species movement and resilience.

The images show the remarkable progress in the last five years. The trees are growing, stabilizing dunes, reducing erosion, retaining moisture in the soil, and shielding coastal communities. As they mature, they’re also providing critical shade and sanctuary for birds, insects, reptiles, and mammals, including endangered sea turtles. They have also no doubt shielded many a surfer relaxing under the Terminalia catappa, or Tropical Almond, trees post beachbreak session. We are not sure if the scientists factored in the effect on the quality of the surfing banks, but our hunch is that with nature taking over, more triangular sandbanks will deliver better waves.

It’s perhaps not surprising that it is Costa Rica leading the way. It’s transformation has been called the most remarkable ecological turnaround on Earth. By the mid-1980s, logging had reduced its forest cover to 25%. Now, forests occupy 57%, with their national park and private reserves protecting 4%, or 500,000, of the world’s animal species.

Related: Drift Theory: Chasing Swells and Flavors from Panama to California

How’d they do it? A two-pronged attack by the government saw a ban on deforestation linked with a payment system to farmers to protect watersheds and conserve biodiversity. The icing on the cake was that the whole deal was paid for by a tax on fossil fuels.

The country’s respect for nature and success in keeping it have led to a booming ecotourism sector. Even if it didn’t have incredible waves, which it does, it’s a bucket list destination that has shown what a nation is capable of when nature is put first. They also operate a “surf ecosystems” model, which encourages coastal communities to implement sustainable tourism programs that uplift livelihoods and encourage protection of high-carbon, high-biodiversity natural areas.

The initial success of this small stretch of the Central American Biological Corridor shows just what might be possible all over the world. Sure, replanting tropical forests aint going to work in OBX and Sydney, but any programs that help regenerate natural ecosystems will always better protect the coast, the waves and the population.

Related: Indonesia's Reefs Face Increased Threat From Mining