Since the 1940s, the world has lost half of its mangrove forests. In Colombia, a stretch of coastline where the trees grow now has an unlikely champion: Apple is investing an undisclosed amount to protect and restore mangroves in a 27,000-acre forest.

“These forests are critical because they’re one of nature’s most important tools in the battle against climate change–they can absorb and store up to ten times more carbon than a terrestrial forest,” Lisa Jackson, Apple’s vice president of environment, policy, and social initiatives told an audience at the Global Climate Action Summit in San Francisco today.

The project, which will involve both planting trees in degraded areas and preserving the trees that still exist, will help capture an estimated 1 million metric tons of CO2 emissions over its lifetime. In its first two years, it will reduce emissions around 17,000 metric tons–roughly the same amount as the emissions from the cars that will update Apple Maps over the next decade, making the program carbon neutral for the company.

Mangrove trees “have the densest carbon storage of any habitat on Earth,” says M. Sanjayan, chief executive officer of the nonprofit Conservation International, which partnered with Apple on the project. “If you want to actually change the thermostat of the world in your lifetime, then ending the destruction of mangroves and restoring them is one of the biggest things you can do.”

The trees, which grow along coastlines, store carbon both in their leaves and branches, like other trees, but also push it into the ground through their underwater roots. Conservation International has calculated, for the first time, how much what they call “blue carbon” the trees sequester underwater, making this the first project that will calculate the trees’ full value as carbon sponges. “By investing, [Apple] opened the door for others to also think about blue carbon as a viable way to sequester carbon and reduce emissions globally,” Sanjayan says.

Apple has also invested in trees in the past, helping protect large forests that were at risk of sale to developers. Working with another nonprofit, the Conservation Fund, the company put up the money for the nonprofit to buy the land and put legal protections in place to make sure that it can be managed sustainably in perpetuity. The company has protected or created enough forests to offset all of its product packaging.

The work is part of the company’s larger moves to become more sustainable. Over the past two years, it issued $2.5 billion in green bonds, and invested in 100% renewable energy for all the stores, offices, and data centers that it runs around the world. It is also working with suppliers on the longer-term goal of bringing renewable energy to the entire supply chain. This summer, it launched a $300 million clean energy fund in China to help businesses access that energy more easily.