Coastal mangrove forests protect shorelines from erosion and storm surges in several ways. The dense root system of mangroves helps to anchor the soil and sediment along the coast, reducing erosion caused by waves and currents. The intricate network of roots also dissipates wave energy, reducing the impact of storm surges on the coastline. Additionally, mangroves act as a natural barrier, absorbing and deflecting the force of incoming waves during storms, thereby protecting the shoreline and coastal communities from damage.