Introduction

The mangroves are a type of salt-tolerant evergreen forests that thrive in the tidal zones of coasts, estuaries, tidal creeks, backwaters, lagoons, swamps, and mudflats, particularly found in tropical and subtropical latitudes1. With a diverse composition of shrubs and trees, approximately 70 to 80 species of mangroves can be found across the world—a very small number of species for a (sub)tropical ecosystem1,2,3. According to the research conducted by Han Bo-Ping, the world’s six major mangrove distribution regions can be categorized into two groups: the Eastern group (comprising the east coast of Africa, the coasts of Asia and the East Pacific islands, and the coasts of Oceania) and the Western group (including the west coast of America, the east coast of America, and the west coast of Africa)3. Notably, in the biodiversity hotspot regions of the Asian coasts and the East Pacific islands, Kandelia obovata and Avicennia marina are two typical dominant species. One species of particular significance is the mangrove K. obovata, a resilient woody plant species belonging to the Rhizophoraceae family. This species thrives abundantly in the region, serving as a crucial coastal shelterbelt and a dominant tree species in numerous nature reserves4,5. Its distribution across these regions underscores its critical ecological significance in the coastal ecosystem. A. marina stands out as one of the keystone species of mangroves in tropical, subtropical, and even temperate regions. Its distribution is more extensive than that of K. obovata, spanning both the northern and southern hemispheres6. This extensive distribution is primarily achieved through the dispersal of sea and winds7,8. As two representative mangrove species along the western Pacific coast, K. obovata and A. marina have profound significance for studying mangrove ecosystems.

In the past, mangrove forests spanned across vast expanses, encompassing more than 200,000 square kilometers of sheltered tropical and subtropical coastlines—accounting for just 0.4% of all forests and less than 1% of tropical forests1,9. Most of these mangroves are concentrated in Asia, followed by Africa, North America, and Central America1. Mangrove forests cover 75% of tropical coastlines between 25° N and 25° S, spanning 123 countries worldwide10,11. More than 65% of the world’s mangrove forests are located in 12 countries10,12. In these countries, there is frequently an observable deficiency in the public’s awareness and understanding of the protective value and ecological significance of mangrove forests. The mangrove forests located around the South China Sea are classified as the East Group of mangrove forests in the world13. Although they account for a relatively small proportion of the total mangrove forests in the world, they have unique ecological characteristics and important values, and play a pivotal role in the global mangrove ecosystem13. However, due to the rapid expansion of population, the acceleration of urbanization, and unreasonable economic development activities, the area of mangrove forests around the South China Sea decreased by nearly 50% in the half century from the 1950s to the end of the twentieth century14. This reduction far exceeds the global average, highlighting the serious damage to mangrove resources.

Unfortunately, these unique ecosystems are now facing a significant threat of global disappearance at an alarming rate of 1–2% per year10. This rate of decline is even greater than or equal to that observed in neighboring coral reefs and tropical rainforests, emphasizing the urgent need for conservation efforts to preserve this critical biome9. The preponderance of contemporary mangrove loss is observed in Southeast Asia, encompassing approximately 50% of the remaining global mangrove forest area. Notably, countries like Indonesia, Malaysia, and Myanmar are experiencing annual losses of 0.26%, 0.41%, and 0.70%, respectively15. The decline is primarily attributed to human activities16 and climate change17, which have had a significant impact on ecological and economic benefits, and have attracted attention18. Although the impact of human activities on mangrove forests has been banned in more and more countries and regions, and corresponding laws and regulations have been enacted and protected areas have been established, the impact of climate change remains profound and difficult to control. Furthermore, it is predicted that the rise in sea level due to global warming may pose the greatest threat to existing mangrove forests19. If the current situation continues, mangrove forests may completely disappear within the next 100 years1,9, making the conservation of this endangered biome an urgent priority.

Model prediction represents an efficient approach for anticipating species distribution and future impacts. Preliminary research on species distribution models (SDMs) has been conducted in the context of mangrove ecosystem conservation. For instance, SDMs have been utilized to model and analyze the distribution of mangroves in Mexico, revealing their spatial patterns and the most significant environmental factors influencing their distribution20. An optimized MaxEnt model has unveiled potential suitable habitats for A. marina mangrove trees in Australia, across six distinct subregions corresponding to known populations with varying phylogenetic histories21. Spatial habitat suitability models indicate that in Taiwan, China, sea-level rise may lead to the expansion of K. obovata mangrove trees from estuarine areas upstream, although this expansion may be constrained by human impacts22. Zhao et al. (2024) mapped the distribution of K. obovata in China using a dual-time-period approach based on Time-series Sentinel-2 Imagery, achieving an overall accuracy of 88.5%, which provides precise species distribution information for sustainable mangrove management. However, climate change exerts profound effects on niche overlap or habitat segregation among multiple species, representing one of the current research hotspots in ecology. Niche overlap typically indicates direct competition among species for resources and living space, whereas habitat segregation may serve as an adaptive strategy employed by species to avoid competition23. Exploring the niche overlap and habitat segregation of two typical mangrove species, A. marina and K. obovata, under the background of climate change, and subsequently analyzing their potential competitive relationships or niche differentiation phenomena, lays the foundation for our further management of these two species along the northern margin of the South China Sea.

In the biodiversity hotspots along the west coast of the Pacific Ocean, mangrove forests occupy a significant portion of the global mangrove area, accounting for nearly 40%. Nevertheless, the mangrove ecosystem in this region remains highly vulnerable and receives limited attention. To address this, we conducted a study that focused on two representative mangrove species (K. obovata and A. marina) found on the west coast of the Pacific Ocean. Our aim was to investigate their (1) current distribution patterns, habitat characteristics, and niche overlap of K. obovate and A. marina, and (2) determine the potential impact of global warming on these mangrove ecosystems under various carbon emission scenarios in the future.

Materials and methods

Study area

The Western Pacific region, stretching from the coastline of East Asia to the eastern borders of Australia and New Zealand, and extending south to Antarctica, occupies a strategically significant and expansive region24. The environmental conditions in the western Pacific are highly variable, influenced by seasonal monsoons, ocean currents, and the interaction between land and sea. The Kuroshio Current, also known as the Japan Warm Current, is a warm ocean current that flows northward from the equator and plays a vital role in the climate and biodiversity of the region25. It brings warm waters and nutrients to coastal areas, supporting rich marine ecosystems and fisheries. Conversely, the cold water currents from Antarctica influence the southern edge, contributing to the formation of diverse marine life adapted to different temperature zones25. For this study, the Western Pacific Ocean stands out due to its unique ecological features and human activities. The region is rich in mangroves, which provide critical habitat for a variety of marine life. These ecosystems are not only crucial for biodiversity conservation, but also provide essential services such as coastal protection, fisheries, and tourism.

Occurrence collection and quality control

Occurrence data of two typical mangrove species, K. obovata and A. marina, on the west coast of the Pacific Ocean, were obtained through three methods: database downloads (Global Biodiversity Information Facility, GBIF, https://www.gbif.org/, accessed on 28 June 2023), literature collection, and our field observations (detailed occurrence points and their sources are provided in the Supplementary Materials, including citations for the referenced literature). First, we standardized the collected latitude and longitude data by converting all sexagesimal coordinates into decimal format. Secondly, we verified whether the collected occurrence fell within the known distribution range and eliminated any duplicate data or outliers that were outside this range. We then used ArcGIS 10.8 software (ESri, Redlands, CA, USA) to project the remaining occurrence onto a map and created a grid of 5 km × 5 km squares, within each of which we retained only the point closest to the center. Finally, we obtained a total of 427 occurrence for K. obovate and 112 occurrence for A. marina for use in model construction (Fig. 1).

Fig. 1
figure 1

The current occurrence sites of K. obovate and A. marina in western Pacific.

Current and future bioclimatic factors

Bioclimatic variables were crucial for defining the species niches26. We downloaded 19 bioclimatic variables (Table 1) with 2.5 min resolution (meaning each 5 km × 5 km grid cell contained a unique value) from Global Climate Database WorldClim version 2.1 (https://www.worldclim.org/data/index.html), which encompassed both current conditions and projected warming scenarios for the year 2100 under four different Shared Socioeconomic Pathways (SSPs). These SSPs included SSP1-2.6 (with a CO2 equivalent concentration of approximately 376 ppm and a radiative forcing of 2.6 W/m2), SSP2-4.5 (CO2 equivalent of about 650 ppm and 4.5 W/m2), SSP3-7.0 (CO2 equivalent of about 1011 ppm and 7.0 W/m2), and SSP5-8.5 (CO2 equivalent of about 1228 ppm and 8.5 W/m2)27,28. Four levels of carbon dioxide emission equivalents corresponded to four different warming scenarios. We used the "Extract Multi Values to Points" spatial analyst tool in the ArcGIS toolbox to extract the 19 bioclimatic variable values for K. obovate and A. marina, respectively. Using the usdm version 1.1–18 package in R, we performed variance inflation factor analysis (VIF < 10) on the 19 bioclimatic variables for both species to eliminate factors with multicollinearity29. The remaining bioclimatic factors were used for modeling analysis, including 8 factors for K. obovate: bio2, bio4, bio8, bio9, bio10, bio13, bio15 and bio18, and 6 factors for A. marina: bio2, bio3, bio8, bio15, bio18, and bio19.

Table 1 The 19 climate variables used in this study.

Data processing and species distribution modelling

To comprehensively evaluate the distribution of suitable habitats for A. marina and K. obovate under current and future climatic conditions, we integrated occurrence data with climatic variables and employed the maximum entropy (MaxEnt) modeling approach30. This involved the use of four representative warming scenarios (SSP1-2.6, SSP2-4.5, SSP3-7.0, and SSP5-8.5) to project potential habitat shifts. To assess the capacity of the model, we designated 25% of the dataset for testing, reserving the remaining 75% for model calibration and training27. The MaxEnt algorithm was run for 1000 iterations, continuing until convergence was achieved, with a threshold set at 0.00001. Subsequently, a threshold-independent receiver-operating characteristic (ROC) analysis was conducted to assess model predictive performance, as quantified by the area under the ROC curve (AUC)27. The AUC values were categorized into five distinct levels: excellent (AUC > 0.9), good (0.8 ≤ AUC < 0.9), fair (0.7 ≤ AUC < 0.8), poor (0.6 ≤ AUC < 0.7), and fail (AUC < 0.6), providing a comprehensive assessment of the model’s predictive capabilities27. To elucidate the relative importance of environmental variables, the Jackknife resampling technique was applied31. The model outputs were exported as raster layers in asc. format and further analyzed in ArcGIS 10.8 (Esri, Redlands, CA, USA) to categorize habitats based on their suitability values. This was followed by the calculation of the area (km2) for each habitat type. Habitats with values below 0.4 were classified as unsuitable, those with values between 0.4 and 0.6 were considered lowly suitable, and habitats with values ranging from 0.6 to 1 were deemed highly suitable.

Niche overlap analysis

Utilizing the 'ecospat' package in R, we analyzed the distribution patterns and climatic data of A. marina and K. obovate across various climate backgrounds32. This enabled us to quantify the niche overlap rate between these two species in the present context, as well as predict their overlap under potential future climate scenarios. Furthermore, we graphically represented the shifts in their ecological niches and calculated the niche parameter, Schoener’s D, which varied from 0 to 1. This metric served as a proxy for the degree of niche overlap, ranging from complete absence of overlap to full congruence. In addition, we conducted a niche-restrictive equivalence test. If the restrictive equivalence test is significant, the hypothesis of niche equivalence between the two species is rejected. Conversely, if the test is not significant, the hypothesis cannot be rejected. Through this rigorous analysis, we aimed to assess the potential impact of climate change on the niches of A. marina and K. obovate. The diagram depicting the key features or services of mangrove ecosystems and the threats to their habitats, particularly in the context of global warming, was created using Adobe Illustrator 2021 (https://www.adobe.com/products/illustrator/free-trial-download.html).

Results

Model efficiency, contribution and permutation importance of bioclimatic factors

Our model demonstrated excellent performance for both species, with high AUC values in both training and test sets (> 0.9). The initial model was constructed, and the contribution rate of each climate variable was determined through the Jackknife test. Figure 2 graphically illustrates the variable contributions and their permutation importance for K. obovate and A. marina. For K. obovate, the most influential factors were bio18, bio2, and bio4, collectively accounting for 92% of the total contribution. Notably, bio9 had the highest permutation importance. For A. marina, precipitation of the warmest quarter (bio18) was the primary factor affecting potential habitats, followed by bio19 and bio8. In terms of permutation importance, bio8 was most critical.

Fig. 2
figure 2

Contribution rate (%) and permutation importance (%) of climate variables of K. obovate and A. marina. (A) Contribution for K. obovate; (B) permutation importance for K. obovate; (C) Contribution for A. marina; (D) permutation importance for A. marina.

Key biological climate factors and their response curves

During the Jackknife test conducted on K. obovate and A. marina, we discovered that bio18 (precipitation of warmest quarter) was a pivotal climate factor in shaping the distribution patterns of both species. This factor held a significant position within the distribution models of K. obovate and A. marina, exhibiting a contribution rate that far surpassed that of other variables. Therefore, we further analyzed bio18, and the results were shown in Fig. 3. For K. obovate, when the precipitation of warmest quarter was between 0 and 500 mm, the suitability value showed a sharp increase pattern and then leveled off. This species inhabited in low-potential habitats where the precipitation of the warmest quarter ranged from 230 to 300 mm, and in high-potential habitats where it exceeded 300 mm. As for A. marina, its suitability value experienced a sharp ascension when the precipitation of the warmest quarter was between 0 and 400 mm. However, beyond 400 mm, the growth rate tapered off until stabilizing after 2300 mm of precipitation. This species inhabited in low-potential habitats with precipitation levels between 300 and 850 mm in the warmest quarter, while in high-potential habitats, it could tolerate precipitation above 850 mm.

Fig. 3
figure 3

Response curves of the climate variables bio 18 (precipitation of warmest quarter) that shape the spatial distribution of K. obovate (A) and A. marina (B).

Distribution pattern under current climate

An overview of the potential habitats of K. obovate and A. marina around the South China Sea under current conditions is shown in Fig. 4, with dark red representing highly suitable habitats and light red representing lowly suitable habitats. For K. obovate, the total potential habitat area measured 5.192 × 104 square kilometers, with the highly suitable area accounted for 1.133 × 104 square kilometers and the low suitable habitat area spanned 4.050 × 104 square kilometers. The prime habitat was primarily situated in the coastal regions of southern China, including northern Taiwan, as well as the northern coastal areas of the Beibu Gulf and the Ryukyu Islands. On the other hand, A. marina exhibited a total potential habitat area that extended to 88.924 × 104 square kilometers. The highly suitable habitat area accounted for 25.837 × 104 square kilometers, while the low suitable habitat area spanned 63.087 × 104 square kilometers. The prime habitat was primarily distributed in the coastal regions of southern China, particularly on the Leizhou Peninsula, the northeastern and southern coastal areas of Hainan Island, and the southeastern coastal areas of Taiwan Island. It could also be found in the eastern offshore regions of Vietnam and its southern coastal areas, the Andaman Islands of India, the southern Ryukyu Islands, a few areas of the Philippines, the southern coastal areas of New Guinea, the central Solomon Islands, the coast of New Caledonia, and along the Great Dividing Range in Australia.

Fig. 4
figure 4

Illustration of the potential distribution of (a) K. obovate and (b) A. marina under the current climate in the South China Sea.

Distribution patterns of warming future under different carbon emission scenarios

The potential habitat projections for K. obovate and A. marina under four carbon emission level scenarios in the year 2100 were presented in Figs. 5 and 6. The potential habitats for K. obovate were shown in Fig. 5A–D, representing the SSP1-2.6, SSP2-4.5, SSP3-7.0, and SSP5-8.5 scenarios, respectively. Notably, the impact of these four levels of future warming on the habitats was expected to be minimal, with a slight upward trend observed in the overall potential habitat areas. For A. marina, the potential habitats were shown in Fig. 6A–D, representing the same four carbon emission level scenarios. According to predictions, the habitats of A. marina were expected to undergo significant reductions under the influence of the four carbon emission scenarios (Fig. 7). Notably, these losses were particularly prominent in the coastal regions of South China, encompassing the northeastern and southern coastal areas of Hainan Island, as well as the southeastern coastal areas of Taiwan Island. Additionally, significant losses were anticipated in the eastern and southern regions of Vietnam, the Solomon Islands, and other areas (Fig. 6A–D).

Fig. 5
figure 5

Projections of potential habitats for K. obovate under four carbon emission level scenarios in 2100. (A) SSP1-2.6 scenario for K. obovate; (B) SSP2-4.5 scenario for K. obovate; (C) SSP3-7.0 scenario for K. obovate; (D) SSP5-8.5 scenario for K. obovate.

Fig. 6
figure 6

Projections of potential habitats for A. marina under four carbon emission level scenarios in 2100. (A) SSP1-2.6 scenario for A. marina; (B) SSP2-4.5 scenario for A. marina; (C) SSP3-7.0 scenario for A. marina; (D) SSP5-8.5 scenario for A. marina.

Fig. 7
figure 7

The changes in habitat areas of K. obovate and A. marina under climate warming scenarios at different carbon emission levels (A) and habitat gain or loss of the total potential habitats (B) (× 104 km2) in 2100.

Current niche overlap and changes under different carbon emissions in the future

In the analysis of niche overlap, the current niches of K. obovate and A. marina did not show strong overlap (Schoener’s D < 0.5), and the niche overlap would decrease in the future climate warming process. Under the SSP2-4.5 scenario with a moderate carbon emission level, the decrease in niche overlap was particularly evident (Fig. 8). For the current scenario and the warming future scenarios under four carbon emission levels, the restrictive equivalence test was significant, rejecting the hypothesis that the niche was equivalent within the distribution range of K. obovate and A. marina. Global warming had promoted the ecological niche separation of K. obovate and A. marina, mainly manifested as the loss of A. marina habitats in the northern hemisphere (Figs. 5 and 6).

Fig. 8
figure 8

The changes in the niche overlap between K. obovate and A. marina under current and four different future scenarios of carbon emissions. (A) Changes in Schoener’s D index of niche overlap; (B) niche overlap in current; (C) niche overlap under SSP1-2.6 scenario; (D) niche overlap under SSP2-4.5 scenario; (E) niche overlap under SSP3-7.0 scenario; (F) niche overlap under SSP5-8.5 scenario.

Discussion

Ecologists have traditionally posited that climatic drivers, such as precipitation and temperature conditions, regulate the global distribution, structure and function of mangroves33. Our study shows that precipitation during the warmest quarter (bio18) significantly contributes to the distribution pattern of suitable habitats for two mangrove species, K. obovate and A. marina. Contrary to the common perception that precipitation has a minor impact on wetland plants, it actually plays a crucial role in indirectly influencing the dispersal of mangrove seeds or embryos, thus shaping ecological distribution centers in regions with higher precipitation33,34. In seasons and regions with higher rainfall, the rain helps to detach mangrove plant seeds or embryos from their adult plant’, and the enhanced riverine flow at the estuaries accelerates their dispersal speed35. Typically, the rainy season coincides with the period of peak temperatures, making the precipitation during the warmest quarter a dominant climatic factor limiting the distribution of K. obovate and A. marina. Compared to seasonal monsoonal or arid climates, nearly all mangrove species grow better in tropical climates with abundant rainfall1. Along wet coastlines, in delta regions, and within estuarine environments, mangrove ecosystems exhibit enhanced abundance and species diversity1. Xu et al. (2024) conducted an in-depth analysis using climate niche models for 100 tree species, revealing that the distribution of more than half of these species is significantly influenced by seasonal variations in precipitation. Of greater concern is the potential for such climate changes to lead to species reassortment in the future, thereby posing a risk of ecosystem disruption. This study strongly advocates for the adoption of proactive forest management and conservation strategies to effectively mitigate the adverse impacts of climate change on tree species distribution and to maintain normal ecosystem functions by alleviating the mismatch between climate and species distribution36.

The significant habitat differences between these two species are influenced by both climatic and other factors. The mature embryos of K. obovate are elongated cylinders with sharp bottoms, which can easily penetrate nearby mudflats upon detachment from the parent plant, facilitating nearby germination and relatively limited dispersal capabilities. Conversely, the mature embryos of A. marina are spherical, capable of floating on water and dispersing over long distances with the aid of currents, enabling colonization in more distant suitable habitats. Long-distance dispersal of mangrove plants is largely facilitated by monsoons and ocean currents37, and A. marina is no exception. The breeding period of A. marina occurs during autumn and winter, when it is primarily influenced by southward-moving ocean currents, resulting in a southward direction of long-distance dispersal (Fig. 9B). Among the mangrove plants in the South China Sea region, those influenced by southward-moving autumn and winter ocean currents and exhibiting a north-to-south long-distance dispersal pattern also include Sonneratia caseolaris, Ceriops tagal, and Heritiera littoralis38,39,40,41,42. K. obovate, on the other hand, is capable of producing mature embryos throughout the year, potentially subjecting it to the influence of monsoons and ocean currents from both directions—diffusing southward in winter and northward in summer (Fig. 9A). However, due to the local germination characteristics of its embryos, it is less likely to disperse to more distant habitats like A. marina. Other mangrove species with breeding periods covering the entire year, such as Rhizophora mucronata, Rhizophora stylosa, Rhizophora apiculata, and Bruguiera gymnorhiza, also undergo long-distance dispersal in both directions in the South China Sea region43,44,45. Long-distance dispersal is the primary factor driving the circular distribution pattern of A. marina around the South China Sea and near regions.

Fig. 9
figure 9

Main dispersal routes of K. obovate and A. marina within their distribution ranges. (A) mature embryo types and dispersal routes of K. obovate; (B) mature embryos and dispersal routes of A. marina.

Habitat loss is a crucial topic of concern for ecologists, as numerous organisms worldwide are at risk of experiencing such losses, and mangroves are no exception. Typically, habitat loss is intimately linked to biodiversity loss16,46. Globally, mangrove forests are disappearing at a rate of 1–2% per year10, resulting in the loss of at least 35% of the world’s mangroves over the past two decades16,46. Our research indicates that future climate warming will have a minor impact on K. obovate, with a slight increase even expected. However, for A. marina, there exists a considerable risk of habitat loss, primarily manifesting as the drastic decline of A. marina habitats in the northern hemisphere due to global warming. The niche analysis conducted in this study also verifies this finding, namely, that future warming will promote the niche segregation of two mangrove species. This is evidenced by the significant decline in the area occupied by A. marina in the northern hemisphere, whereas K. obovate is uniquely distributed in the northern hemisphere. Alternatively, climate warming has led to the withdrawal of A. marina from numerous habitats in the northern hemisphere, thereby creating space and resources for K. obovate. Consequently, K. obovate is less affected by climate change and has even slightly encroached on a small portion of A. marina's habitat.

The potential habitat loss of A. marina under future climate warming scenarios deserves serious consideration. The relationship between biodiversity and the functioning of marine ecosystems is often positively correlated, thus the loss of biodiversity may lead to a decline in ecosystem functioning, subsequently affecting the ability of ecosystems to provide goods and services to humans46. The loss of mangrove forests and/or individual species not only accelerates the depletion of biodiversity and ecosystem functions but also poses potential negative impacts on human livelihoods and the provision of ecosystem services. Regions experiencing significant mangrove area loss or those with a high number of mangrove species facing elevated extinction risks and relatively low mangrove diversity, such as the Gulf of California in the Eastern Tropical Pacific, are more prone to experiencing the loss of ecosystem functions and related services compared to areas boasting higher species diversity47. In rural and high-poverty areas, the economic consequences of mangrove deforestation and species loss are particularly severe, as subsistence communities in these regions rely heavily on mangrove habitats for fishing activities and the direct harvesting of mangroves for fuel, construction materials, and other economic products35. Therefore, there is a need for the establishment of specialized international organizations to adopt a series of effective measures, such as habitat restoration or climate adaptation planning, to collectively support mangrove management and conservation in these areas, particularly focusing on A. marina, which may face habitat loss due to future warming.Consequently, our study highlights the urgent need to adopt measures to salvage mangrove ecosystems in response to these threats. Firstly, we can reduce the input of nutrients through human intervention. Secondly, artificial planting can be employed to restore some damaged mangrove ecosystems. Moreover, it is crucial to prioritize the protection of remaining mangrove habitats, such as through the establishment of appropriate nature reserves. Finally and most importantly, we should encourage public participation in energy conservation and emission reduction efforts to reduce greenhouse gas emissions and protect mangrove ecosystems in the long run.

Conclusions

This study focuses on the dominant mangrove species in the northern margin of the South China Sea: K. obovate and A. marina. We have discovered that the precipitation during the warmest quarter plays a pivotal role in shaping the current distribution patterns of these two species. Specifically, K. obovate is primarily concentrated in the Northern Hemisphere. In contrast, the distribution range of A. marina is much more extensive. Further research reveals that there is a low degree of niche overlap between K. obovate and A. marina. As the climate continues to warm in the future, this niche difference is expected to widen, further separating the distribution areas of the two species. Notably, the impact of global warming on K. obovate is relatively limited and may even slightly expand its habitat. However, the situation for A. marina is less optimistic. Global warming will significantly increase the risk of habitat loss, particularly in the Northern Hemisphere, where the habitats of A. marina will face severe threats. This study emphasizes that it is crucial to maintain these fragile habitats through active advocacy and joint conservation actions, and to strengthen the sustainable development and protection of the mangrove ecosystem along the coast of the South China Sea.