In 2013, the Mikoko Pamoja community organisation signed an agreement with the Kenya Forest Service to sell carbon credits from the project for 20 years and to plant 4,000 mangrove trees annually to replace those harvested legally or lost to illegal harvesting.
Working with the forest service and KMFRI staff, community members divided the mangrove forest into 10m by 10m plots, measured the size of the trees in each plot and calculated their rate of growth, to come up with a figure for their carbon storage capacity and to generate carbon credits, explained Salim Mwarima, Mikoko Pamoja's project officer in charge of the carbon offset scheme.
Using that information, the community group has so far earned about $30,000 over two years selling carbon credits to international buyers, who purchase them to offset their own emissions.
The money has been a major motivation for people to become involved in mangrove conservation, said Nafasi Mfahaya, the Kenya Forest Service's ecosystem conservation officer for Kwale County, where Gazi Bay is located.
Salim, the chairman of Mikoko Pamoja, agreed.
"Now people know if we conserve the mangroves, we will have water. (And) if we conserve the mangroves we will have textbooks for the children," he said.
Mangrove cover in Kenya is currently estimated at 50,000-60,000 hectares, according to a report published this year by the United Nations Food and Agriculture Organization. The FAO says this represents a decline of almost one-fifth since 1985.
Salim, 50, recalls that when he was growing up here on the coast, mangroves were harvested indiscriminately for building houses, making boats and burning as firewood and charcoal.
But gradual awareness of the benefits of mangroves has resulted in more controlled harvesting of the trees.
"If you look at the shoreline (at Gazi Bay) you will realise we still have mangroves within our area of conservation," said Ali Zuberi, a member of the group.
"You also will notice that there are stumps of trees cut a number of years ago. The trees remaining are out of our relentless efforts to inform people about the great significance of ensuring mangroves remain standing," he said.