The implementation of habitat destruction methods that promote native survival under invasion

Controlling invasive alien species invasion and maintaining the survival of native species have attracted increasing attention, and habitat destruction can be used to achieve these aims. However, whether and how to promote the long-term survival of native species facing invaders through the use of habitat destruction remain unclear. In this study, we developed a spatially explicit simulation model in which invaders and natives were exposed to habitat destruction with different properties, including the spatial structure and the introduction time of habitat destruction, the interval between two destruction events, and the proportion of destroyed habitat. The results showed the following: (1) introducing habitat destruction could promote the long-term survival of native species, especially for a clustered initial spatial distribution of species or long-distance dispersal; (2) the positive effect of habitat destruction on the survival of native species occurred only for a period of time after introduction, such that the destroyed habitats gradually encompassed natives and separated them from invaders, prior to which habitat destruction substantially decreased the abundance of native species; (3) intermediate to high levels of habitat destruction were the most beneficial to the protection of native species for the clustered spatial distribution of species at the initial time or the short dispersal distance; (4) and even when ignoring the proportion of destroyed habitats, introducing spatially dispersed habitat destruction at an earlier time and shortening the interval between two habitat destruction events were very beneficial to the protection of natives. These insights can help facilitate the protection of natives under invasion by adjusting the implementation method of habitat destruction.


Introduction
Biological invasions have attracted much attention from politicians, scientists, and the general public and are considered one of the most difficult environmental problems (Wolfe 2002;Blackburn et al. 2019;Pysek et al. 2020). Invaders can suppress native populations, decrease species richness, and alter ecosystem processes (Liao et al. 2008;Vila et al. 2010;Wardle et al. 2011). Some of the key drivers of these influences are the competitive superiority of invaders (Ortega and Pearson 2005;Maron and Marler 2008) and their greater ability to disperse throughout recipient communities (Pysek and Richardson 2008;Murray and Phillips 2010;Flores-Moreno et al. 2013). Specifically, when exotic species, especially those that are functionally similar to native species, arrive at the native community, they may have great niche overlaps with natives and hence pose as strong competition (Maron and Marler 2008;Hänfling et al. 2011). Due to their advantage of utilizing resources, the abundance of the native populations will dramatically decline. By establishing themselves in empty habitats or available space, exotic species may inhibit the seedling germination of natives (Crawley et al. 1999;Yurkonis and Meiners 2004). Given the dramatic invasion-caused impact on native species, ecological studies should focus more on issues of protecting native populations than controlling exotic species.
Habitat destruction, a process in which a natural habitat is rendered functionally unable to support the species present, has been documented to play certain roles in the outcome of biological invasions (With 2004;Newbold et al. 2015). Normally, habitat destruction is expected to enhance biological invasions (Alpert et al. 2000;Marvier et al. 2004;Alofs and Fowler 2010;Kumschick et al. 2015). For example, exotic species with better dispersal abilities were assessed as benefitting more from habitat destruction (With 2004;Pearson and Dawson 2005); additionally, for native western grey tree squirrels, tree canopy loss provided a competitive advantage to alien tree squirrels (Jessen et al. 2018). Moreover, recent field surveys of the American bullfrog Lithobates catesbeianus indicated that habitat destruction has facilitated the expansion and occupation of invaders among the remaining limited resources (Wang et al. 2021).
Although habitat destruction could promote the invasion process to some degree, this influence would not always occur at each site. In some cases, it could even inhibit the expansion of invaders and be utilized as a conservation practice for biodiversity. For example, in central Texas, fragmented patches of herbaceous vegetation were shown to slow the spread of invaders with limited dispersal (Alofs and Fowler 2010). In addition to field studies, Liu et al. (2012) built a metapopulation model and suggested that habitat destruction could inhibit invaders when there was competition pressure and habitat destruction. Other theoretical models have provided similar insights and have indicated that habitat destruction helps to inhibit the spread of invasive populations (Brown et al. 2012; Barron et al. 2020;Bozzuto et al. 2021). Therefore, habitat destruction is regarded as possibly being effective in preventing the invasion process.
Understanding the relationship between habitat destruction and invasion processes is a challenge (Alofs and Fowler 2010). The above literature has paid the most attention to the effects on invader attributes. Total area loss, patch isolation, or frequent exposure to edge effects, which arise from habitat destruction, could initiate long-term changes in any population (Haddad et al. 2015;Hertzog et al. 2019), even native and exotic populations. For example, after the occurrence of habitat destruction, the abundance of native spiders increased significantly with the decreasing size of undestroyed habitats and the abundance of non-natives increased significantly with time (Bolger et al. 2008). However, understanding the effects of habitat destruction on native populations remains a challenging task. As a result, research on the use of habitat destruction for the management of biological invasion should examine the full response of all species in the system, especially native and endangered species. Additionally, considering only habitat destruction according to one factor (e.g., amount levels) is not sufficient, as the influence of habitat destruction is complicated. For example, random landscape destruction would decrease richness more than when area is lost in spatial aggregation (Yin et al. 2021). Habitat destruction could also be referred to as a dynamic process (Fahrig 2017;May et al. 2019). As a result, it should generally be considered the combined consequence of multiple distinct factors, such as destruction intensity, extent, and frequency; spatial configuration of habitat destruction; or beginning time of destruction events (Kinzig and Harte 2000;Roxburgh et al. 2004;Didham et al. 2012;Rybicki et al. 2020).
Considering the above contents of the review, we considered habitat destruction according to multiple distinct factors and established a spatially explicit simulation model to focus on the fate of native and non-native species after the occurrence of habitat destruction to reveal the influence of habitat destruction on invasion expansion and native survival. Specifically, the simulation model is a simple two-species competition system. One of these species is regarded as the invader and is assigned dominant invasion attributes, such as competitive invasion or survival rate superiority. Destruction events are then introduced into this competition system. By calculating the equilibrium conditions across parameter space and considering the inhibited properties of habitat destruction through four aspects, including the spatial structure, interval between destructing events, total destruction proportion, and introduction time, we mainly attempted to address the following two questions: (1) Does habitat destruction prevent native extinction, and (2) which properties of habitat destruction promote the long-term survival of native species facing invaders?

Models and methods
The dynamics of our system are implemented by the rule-based simulation approach and cellular automata model (Wolfram 1986). This type of method can handle very complex spatial situations and difficult criteria. Cellular automata models are especially suitable for exploring spatially structured population dynamics and have become one of the most popular model types to study spatially extended dynamics in ecology (Broder et al. 2011). Additionally, since the conceptual basis of cellular automata is quite simple, easy to understand and applicable with almost any conventional or object-oriented programming language, we selected this type of method to incorporate our invasion and habitat destruction process.
We first simulated the invasion processes where there were two species. Species 1 was defined as an invasive alien species that had superior competitive abilities or a higher ability to occupy empty habitats. The native species is species 2. When the invasion spread to a certain period of time, we introduced the habitat destruction events. Then, after sufficient time steps, species population densities and spatial patterns were explored further. The model design and timing is shown in Fig. 1.

Invasion model
We assumed a two-dimensional landscape with 100 × 100 cells and periodic boundary conditions. System dynamics were implemented in this landscape. Individuals were assumed to possess limited dispersal abilities and interact only with their nearest neighbours (von Neumann neighbourhood with z = 4 ). Each cell could be in three habitat states: empty (0), occupied by alien species (1), or occupied by native species (2). Initially, natives and invaders accounted for forty-five percent of cells, and the proportion of invaders among the neighbours of invaders  Table 2, u denotes that the current cell was destroyed, t 0 is the introduction time of habitat destruction, t η is the interval between two habitat destruction events, D μ,t ζ (or D ν,t ζ ) is the proportion of destructed habitats at step t ζ for random (or contagious) habitat destruction, D end is the total proportion of destructed habitats for random and contagious habitat destruction, and k is the times of habitat destruction event (see Tables 1, 2 for  more details) was very high ( 0.9 ) (see Sect. 1.1 in "Robustness of results" for additional details). The other cells were empty. The entire simulation began with this type of initial community setting. All parameter descriptions are provided in Table 1.
The change in the state of any cell was governed by the updating rules of the cellular automata and depended on the state of the considered cell as well as on the states of its neighbours (see Table 2 for details). In the birth process, individuals attempt to deposit their offspring into empty nearest-neighbour sites. The colonization rate of species i wasr i . We assume the probability of 0 → i was still proportional to their individual number among the nearest neighbours of species i( ∑ sp i z ). Then the transition rate from empty to state i would ber i ∑ sp i z . However, for the death process, individuals die at a natural rate m i (i = 1, 2) (Hiebeler et al. 2016). However, they may also die from species competition nearby. Parameters ii and ij quantify the extra deaths caused by intraand interspecific competing forces, respectively, and the values with a higher magnitude indicate more intense competition. Moreover, the sign of ij represents the type of species interaction, and ij > 0 indicates a negative interaction, namely species i has a competing force on species j, whereas ij = 0 implies no interaction. Cell state i transfers to an empty site D μ,t ζ Proportion of destructed habitats at step t ζ for random habitat destruction D ν,t ζ Proportion of destructed habitats at step t ζ for contagious habitat destruction D end Total proportion of destructed habitats for random and contagious habitat destruction x μ Probability that each intact habitat becomes destructed at each step for random habitat destruction 0.025 x i,t ζ Probability that each habitat in group i ( i = 0, 1, … , 8 ) becomes destructed at step t ζ for contagious habitat destruction n μ,t ζ Total number of intact habitats at step t ζ for random habitat destruction n i,t ζ Total number of habitats in group i ( i = 0, 1, … , 8 ) at step t ζ for contagious habitat destruction t 0 Introduction time of habitat destruction t η Interval between two habitat destruction events i A sequence of constants which was used to describe the degree to which habitat destruction is contagious, and i = 0, 1, … , 8 z )(i, j = 1, 2 and j ≠ i) . We ran the dynamic system until all global densities reached equilibrium.

Habitat destruction model
To simulate the habitat destruction process, we built discrete habitat destruction models in time and space, i.e., a random and contagious habitat destruction model. As described in "Invasion model", section the landscape included 100 × 100 cells with equal area and shape. Initially, all cells were considered to be intact, but if habitat destruction occurred in an intact cell, it was considered destroyed. The models were defined as follows.
For random habitat destruction, each intact cell was destroyed with equal and fixed probability x μ (the value is given in Fig. 2). The proportion of destroyed cells at step t ζ ( t ζ = 0, 1, 2, … ) is denoted by D μ,t ζ and is calculated as follows: For contagious habitat destruction, we used the global forest data reported by Boakes et al. (2010) to build the model. At step t ζ , the proportion of destroyed cells is denoted by D μ,t ζ . According to the Moore neighbourhood (Boakes 2010), all intact cells were divided into nine groups, and each cell in group i ( i = 0, 1, … , 8 ) had i destroyed neighbours. If an intact cell had more destroyed neighbours (i.e., i was larger), the probability that the cell becomes destroyed was higher. Thus, if x i,t ζ represents the destruction probability of group i at step t ζ , we obtain To compare the two types of models, we assumed that all intact cells were destroyed at a constant rate as follows: where n μ,t ζ denotes the total number of intact cells at step t ζ for random habitat destruction, and n i,t ζ denotes (1) group i when contagious habitat destruction occurs. In addition, we obtained the following: where 10000 is the total number of cells in the landscape (see "Invasion model" section). To calculatex i,t ζ , we introduced 0 and a sequence of constants i ( i = 0, 1, … , 8 ) such that 0 ≤ i < j ≤ 1 fori < j , and letx i,t ζ = 0 i . Therefore, habitat destruction is highly contagious when the sequence i is rapidly increasing withi . The global forest data reported by Boakes et al. (2010) are used to obtain the values of i , and we let it correspond to weak degrees of contagious habitat destruction. To compare to the weak degrees of contagious habitat destruction, we set two alternative groups of values for i , and let them correspond to intermediate and high degrees of contagious habitat destruction. The sequences of i for weak, intermediate, and high degrees of contagious habitat destruction are given in Fig. 2. From Eq. (2), we can obtain We could thus obtain the values of 0 and thereby the values of x i,t . As x i,t are probabilities, we should ensure that n i,t . Therefore, we can obtain the value of 1 and thereby the values of x i,t ζ for0 ≤ i < i 1 . If there are stillx i,t ζ > 1 , we repeated the above process until allx i,t ζ ≤ 1.

Implementation method and data processing
We set the species death rates as m 1 = m 2 = 0.01 . The intrinsic growth rate of native species 2 was r 2 = 0.1. By maintaining the value of the intrinsic growth rate of invader species 1 proportional to that of native species 2, namely, r 1 = e * r 2 (e ∈ [1, 3]) , we could control the gradient of growth superiority. A larger value of e indicates a stronger dispersal advantage of invasive species, and e = 1 corresponds to equal spreading abilities. The value of e is set from 1 to 3 such that the invasive alien species had a higher ability to occupy empty habitats than native species and the native species still had a chance to survive. The other important parameters of the system are the intraspecific and interspecific competition coefficients between species i and j ij (i, j = 1, 2) , and 11 = 22 = 0.01 . We fixed the competing force from native species 1 to invader Fig. 2 Examples of highly, intermediately, and weakly contagious habitat destruction and random habitat destruction processes. The blue areas are intact cells, and the white areas are destroyed cells. Parameters: x μ = 0.025 . Highly contagious habitat destruction: 0 = 1 , 1 = 200 , 2 = 800 , 3 = 1, 501 , species 2 as 21 = 0.03 and assumed that invaders had competitive superiority ( 21 < 12 = * 0.03 ). When =1, 21 = 12 , i.e., competitive symmetry occurs. The value of is set from 1 to 3 such that the invasive species had a higher competitive ability than native species and the natives still have a chance to survive. The native and invasive species accounted for up to forth-five percent of the cells, and the other cells were empty.
The simulation processes of invader and native dynamics and habitat destruction were implemented as follows.
(1) We first set the values for the total proportion of destroyed habitats as D end for random and contagious habitat destruction; the introduction time of habitat destruction as t 0 ; and the interval between two habitat destruction events as t η . These values are shown in the figures in "Results" section. (2) As described in "Invasion model" section, we let invaders and natives dynamically change in the landscape.
(3) If habitat destruction was introduced, we introduced the first random and contagious habitat destruction event at step t 0 by our habitat destruction procedure (see "Habitat destruction model" section). If an intact habitat was destroyed, it could not be occupied by invaders and natives, and the individual living in it immediately died. We then let invaders and natives dynamically change in the landscape as described in "Invasion model" section for the duration t η . This process was repeated until the proportion of destroyed habitats reached D end . Then the landscape did not change, and we kept all species dynamically changing in the landscape until the entire system reached an equilibrium state. (4) If habitat destruction was not introduced, we kept invaders and natives dynamically changing in the landscape until the entire system reached an equilibrium state.
In all the simulations, the invasive and native species had no obvious changes when the simulation step was 3000 . Therefore, we considered that the entire system reached the equilibrium state at step 3000 . To eliminate stochasticity, ten independent replicated simulations were performed, and we generated the figures in "Results" section based on the 10 replicates.
Specifically, the parameter space where native species densities were positive in the equilibrium state for at least 6 replicates was the species coexistence region, and the other parameter value combinations were considered native extinction. The density of natives is the ratio of the number of cells occupied by native species to the number of all cells (i.e., 10000 ). The mean density for natives was measured from the 10 replicated simulations. For the proportion of species or cells in the neighbours of natives, we also measured the mean among the 10 replicated simulations. The proportion of parameter space in which the native can survive when facing invaders is the ratio of the parameter space of invaders in which native species can survive under invasion in at least 6 replicates relative to the entire parameter space.

Results
In "Habitat destruction can improve the survival of natives facing invaders" section, we investigated whether habitat destruction could enhance the probability of survival for native species. In "Random habitat destruction can better enhance native survival"-"Intermediate to high levels of habitat destruction have a better protection effect" sections, we investigated the optimal measures for promoting the long-term survival of native species based on the spatial structure of habitat destruction, the interval between two destruction events, the introduction time of habitat destruction, and the proportion of destroyed habitat. In "How to protect natives from different spatial distributions and dispersal" section, we investigated whether the results from "Habitat destruction can improve the survival of natives facing invaders"-"Intermediate to high levels of habitat destruction have a better protection effect" sections still held true for different initial spatial distributions of species and dispersal distances. In "Robustness of results" section, we investigated the robustness of the results with respect to changes in the parameters of the invasion model.
Habitat destruction can improve the survival of natives facing invaders Figure 3A illustrates that if habitat destruction is absent, when competition advantage and dispersal advantage e are larger than approximately 1.2 or 1.4 , the invasive alien species will drive the native species to extinction. However, if habitat destruction is introduced, e.g., at 150 time steps, even when the competition advantage and dispersal advantage e reach approximately 3 , the native species still possibly survives (Fig. 3b). Therefore, habitat destruction can protect native species from extinction to some extent. This result is also in accordance with previous studies that have suggested that habitat destruction can be used to control biological invasions (Alofs and Fowler 2010;Barron et al. 2020;Bozzuto et al. 2021).
Protecting native species from extinction under the threat of invaders (Fig. 3) does not mean that habitat destruction is beneficial for all ecological processes of native species. Thus, we analysed whether habitat destruction is always beneficial for natives. Figure 4a shows that compared with the case without habitat destruction, the native species density decreased due to destruction (curves located below zero) over a long period. This degree of decline was much more obvious for the natives that could coexist with invaders without habitat destruction (green curve) than for the others (blue curve). Additionally, Fig. 4a demonstrates that after a sufficiently long time period, habitat destruction could finally allow the native density to exceed the density in the case without destruction. This trend was still more significant for the native species that were strong enough to coexist with invaders without habitat destruction (green curve). As a result, after the introduction of habitat destruction, the density of natives immediately declined, and the promoting effects of habitat destruction on natives occurred only after a long period. The above results from a parameter value case (Fig. 4b) also support this trend.

Random habitat destruction can better enhance native survival
In this section, we explored how the spatial structure of habitat destruction influenced the long-term survival of native species facing invaders. Figure 5a illustrates that when introducing highly contagious habitat destruction, if the competition advantage and dispersal advantage e of invaders are larger than approximately 1.5 or 2 , respectively, the native species have a small chance of survival. If the habitat destruction is less contagious (i.e., intermediately contagious), the Fig. 3 Habitat destruction can protect natives from extinction due to invasion. Panels (a, b) show the parameter space (axis of dispersal advantage e and competition advantage of invaders) for species coexistence, namely, native species can coexist with alien species (see "Implementation method and data processing" section for a definition) and native extinction, respec-tively, when not introducing a or introducing b random habitat destruction. The parameters of the invasion model are listed in Table 1. Most of the parameters for the habitat destruction model are shown in Fig. 2, and the other parameters are D end = 50% , t 0 = step150 , and t η = 10steps The implementation of habitat destruction methods that promote native survival under invasion native species facing the invasive alien species with a competition advantage of approximately 2 and a dispersal advantage of e approximately 2.5 still have a chance to survive (Fig. 5b). If weakly contagious or random habitat destruction is introduced, even when the competition advantage and the dispersal advantage e both reach approximately 3 , the native species can also survive (Fig. 5c, d). From highly contagious habitat destruction to random habitat destruction, the spatial distribution of destroyed habitats became more dispersed (Fig. 2). As a result, the greater dispersion of habitat destruction will more vigorously promote the long-term survival of native species facing invaders.

Habitat destruction will protect natives better if it is introduced earlier
In this section, we calculated the proportion of parameter space that the native can survive facing invaders and investigated how it changed with the interval between two habitat destruction events and the introduction time of habitat destruction. Figure 6 shows that when the interval between two destruction events was very long (i.e., 40 steps), the proportion of parameter space in which the natives can survive was only approximately 0.45 , and if the interval decreased, the proportion increased rapidly, even reaching approximately 1 . In addition, Fig. 6 demonstrates that when the interval was 40 , the Habitat destruction yields adverse effects on natives for a long time after introduction. The curves in the figure show how the density difference of native species 2 changes along the time axis; the green curves represent the natives that can coexist with invaders when not introducing habitat destruction; and the blue curves correspond to the natives who suffer from invasion-caused extinction. The density difference is the density of natives with habitat destruction minus the density without habitat destruction. Panels (a, b) are the results of the mean (see "Implementation method and data processing" section for a definition) and a single point ( = 1.1 , e = 1.1 (green curve) or = 1.2 , e = 1.4 (blue curve)) case, respectively. We introduced random habitat destruction, and the parameters of the invasion model are shown in Table 1. Most of the parameters for the habitat destruction model are shown in Fig. 2, and the other parameters are D end = 50% , t 0 = step150 , and t η = 10steps proportion of parameter space in which the natives can survive sharply increased from approximately 0.3 to approximately 0.6 if the introduction time decreased from a very late step (step 200 ) to a very early step (step 5 ). The proportion also increased with decreasing introduction time in other interval value cases. As a result, if the interval between two habitat destruction events is shorter or if the introduction time of habitat destruction is earlier, the native species has a greater chance of survival under invasion.

Intermediate to high levels of habitat destruction have a better protection effect
In this section, we explored how the proportion of destroyed habitat influenced the survival of native species facing invaders. Figure 7 illustrates that when the proportion of destroyed habitat was very low (approximately 20% ), the proportion of parameter space that the natives can survive was approximately 0.1 , and if the proportion of destroyed habitat increased, the proportion also increased and reached approximately 1 when the proportion of destroyed habitat was intermediate (approximately 35% ), and this trend continued until the proportion of destroyed habitat was very high (approximately 80% ). As a result, if intermediate to high levels of habitat destruction are introduced, native species will obtain the best protection. Introducing random habitat destruction will better protect native species facing invaders. Panels (a-d) show whether native species can coexist with invasive alien species (see "Implementation method and data processing" section for a definition) based on the dispersal advantage e and the competition advantage of the invasive alien species when introducing highly (a), intermediately (b), and weakly (c) contagious habitat destruction and random habitat destruction (d). The parameters of the invasion model are shown in Table 1. Most of the parameters for the habitat destruction model are shown in Fig. 2, and the other parameters are D end = 50% , t 0 = step150 , and t η = 10steps Fig. 6 Habitat destruction will better enhance the survival of native species when the interval between two destruction events is shorter or when the introduction time is earlier. The panel shows the relationships between the proportion of parameter space in which the natives can survive (see "Implementation method and data processing" section for a definition) and the interval between two destruction events or introduction time when introducing random habitat destruction. Curves with different colours correspond to various introduction time step cases, and the error bars represent one standard error of the mean, calculated across 10 replicates. The parameters of the invasion model are shown in Table 1. Most of the parameters for the habitat destruction model are shown in Fig. 2, and the other parameter is as follows: D end = 50% How to protect natives from different spatial distributions and dispersal After the introduction of habitat destruction, the native species still have the ability to survive even if the invaders have a stronger competitive ability or a greater dispersal advantage than if the destruction had not been introduced (Fig. 3), and intermediate to high levels of habitat destruction can better protect natives from extinction under invasion (Fig. 7). However, if the initial spatial distribution of species or dispersal distance changes, the results still hold true?

Whether habitat destruction can enhance native survival
When the initial spatial distribution of species changes from a clustered distribution (Fig. 3) to point invasion (Fig. 8a, b), dispersed distribution (Fig. 8c,  d), and random distribution (Fig. 8e, f), the native species always have a greater opportunity to survive after the introduction of habitat destruction; however, the degree of increase is different. For clustered distribution and point invasion, if habitat destruction is introduced, the proportion of parameter space in which the natives can survive increases to approximately 100% (Fig. 3b and Fig. 8a, b); for dispersed distribution and random distribution, the proportion only increases to 27% or 25% , respectively (Fig. 8c-f). When the dispersal distance increases (i.e., from the von Neumann neighbourhood to the Moore neighbourhood), Fig. 3 and Fig. 8h show that the chances of survival after the introduction of habitat destruction decrease. Compared with dispersed or random distribution, the initial distribution of species is more clustered for clustered distribution or point invasion (see Sect. 1.1 in "Robustness of results" for additional details). As a result, natives will have a better probability of survival after the introduction of habitat destruction, if the initial distribution of species is more clustered or the dispersal distance is shorter.

The optimal level of habitat destruction for protecting natives
When the initial distribution changes from a clustered distribution (Fig. 3) to point invasion (Fig. 9a), the optimal levels of habitat destruction for protecting natives are also intermediate to high (i.e., very broad, from 30% to 70% ); however, if the initial distribution changes to a dispersed or a random distribution, only intermediate levels of habitat destruction (i.e., from 40% to 55% ) provide a greater probability of survival to the natives under invasion (Fig. 9b, c); and when the dispersal distance increases (i.e., from von Neumann neighbourhood to Moore neighbourhood) for clustered distribution of species, this level also narrows (Figs. 3, 9d). Therefore, if the initial spatial distribution of species is more dispersed or dispersal distance is longer, the optimal level of habitat destruction for protecting natives is narrower in scope.

Robustness of results
In this section, we tested the robustness of our results, with respect to changes in the parameters of the invasion model. As the neighbourhood and initial spatial distribution of species have strong impacts on invasion processes and thus the results, we tested the Fig. 7 Intermediate to high levels of habitat destruction can better protect natives from extinction under invasion. The panel shows the relationship between the proportion of parameter space in which the natives can survive (see "Implementation method and data processing" section for a definition) and the total proportion of the destroyed habitats, when introducing random habitat destruction. The total proportion of the destroyed habitats was measured when no more intact habitats were destroyed (see the simulation processes in "Implementation method and data processing" section for details). The error bars represent one standard error of the mean, calculated across 10 replicates. The parameters of the invasion model are shown in Table 1. Most of the parameters for the habitat destruction model are shown in Fig. 2, and the other parameters are t 0 = step5 and t η = 5steps robustness of our results, with respect to changes in the two parameters. Since we used the von Neumann neighbourhood, which corresponds to very shortdistance dispersal of species for the main results, we used the Moore neighbourhood corresponding to longer-distance dispersal to test the robustness of the results. Since we used the clustered spatial distribution of species for the main results, we introduced three other spatial distributions to test the robustness of the results, i.e., dispersed distribution or random distribution: the spatial distribution of species was very dispersed or random, and point invasion: the invasive species was distributed in the centre of the landscape (see Sect. 1.1 in "Robustness of results" for additional details). We compared the results from the invasion model with a von Neumann neighbourhood and clustered distribution (henceforth, "invasion model with original parameters") with those from the invasion models with a clustered distribution and Moore neighbourhood, a dispersed distribution and von Neumann neighbourhood, and a random distribution and von Neumann neighbourhood (henceforth, "invasion models with altered parameters"). We found that random habitat destruction can still better Fig. 8 Habitat destruction protects the natives better for clustered distribution or short-distance dispersal. Panels (a-h) show the parameter space (axis of dispersal advantage e and competition advantage of invaders) for species coexistence, namely, native species can coexist with alien species (see "Implementation method and data processing" section for a definition) and native extinction, when not introducing (a), (c), (e), and (g) or introducing (b), (d), (f), and (h) random habitat destruction. Panels (a, b) correspond to the point invasion and von Neumann neighbourhood, panels (c, d) correspond to the dispersed distribution and von Neumann neighbourhood, panels (e, f) correspond to the random distribution and von Neumann neighbourhood, and panels (g, h) correspond to the clustered distribution and Moore neighbourhood. The parameters of the invasion model are listed in Table 1. Most of the parameters for the habitat destruction model are shown in Fig. 2, and the other parameters are D end = 50% , t 0 = step150 , and t η = 10steps enhance native survival under invasion than contagious habitat destruction for the altered parameters of invasion model (see Sect. 1.2 in "Robustness of results"). The increased survival of native species under invasion if habitat destruction is introduced earlier also remains unchanged in the invasion models with altered parameters (see Sect. 1.3 in "Robustness of results"). For point invasion and the von Neumann neighbourhood, whether the spatial structure of habitat destruction, the interval between two habitat destruction events, or the introduction time of habitat destruction changes is not the key factor for the survival of natives under invasion; thus, we do not analyse them in this section. As a result, we conclude that our observed results are robust against changes in the parameters of the invasion model.

Discussion
WE can analyse the detailed spatial evolution of each population. As shown in Fig. 10, the main method by which habitat destruction protects native species from extinction when facing invaders is by separating invader individuals from native individuals. Specifically, without habitat destruction, native species would be largely surrounded by alien species. We determined that the proportion of invasive individuals among native neighbours was approximately 100% at its peak (Fig. 10a). Thus, the native population experienced many competing forces. However, if habitat destruction was introduced (Fig. 10b), this proportion gradually declined to almost 0 , and the proportion of destroyed habitats in the neighbours of native species gradually reached approximately 50% . Thus, compared with the situation in which habitat destruction was not introduced, if habitat destruction was introduced, alien invaders would be gradually replaced by destroyed habitats, thereby gradually separating alien invaders from natives. In this case, alien invaders could neither compete to occupy the empty cells neighbouring native species nor directly increase the mortality rate of native species (see "Invasion model" section for a discussion of how invaders drive native species to extinction). The spatial distributions of natives, invaders, and destroyed habitats could further demonstrate that the destroyed habitats gradually encompassed natives and separated out invaders from natives ( Fig. 9c-j).
In addition, separating alien invaders from natives could explain why habitat destruction with the following properties could better protect natives: the proportion of destroyed habitat was intermediate to Fig. 9 The optimal level of habitat destruction for protecting natives according to different distributions and dispersal distances. Panels (a-d) show the relationships between the proportion of parameter space that the natives can survive (see "Implementation method and data processing" section for a definition) and the total proportion of the destroyed habitats when introducing random habitat destruction. The total proportion of the destroyed habitats was measured when no more intact habitats were destroyed (see the simulation processes in "Implementation method and data processing" section for details). The error bars represent one standard error of the mean, calculated across 10 replicates. Panel (a) corresponds to the point invasion and von Neumann neighbourhood, panel (b) corresponds to the dispersed distribution and von Neumann neighbourhood, panel (c) corresponds to the random distribution and von Neumann neighbourhood, and panel (d) corresponds to the clustered distribution and Moore neighbourhood. The parameters of the invasion model are shown in Table 1. Most of the parameters for the habitat destruction model are shown in Fig. 2, and the other parameters are: t 0 = step5 and t η = 5steps high (Fig. 7), the destroyed habitat was dispersed in the invaded range (Fig. 5), habitat destruction was introduced at an earlier time, and the interval between two habitat destruction events was very short (Fig. 6); these properties of habitat destruction may better separate alien invaders from natives. These results also suggest that habitat destruction may have positive effects on biodiversity, although habitat destruction  panels (a, b) show the relationships between the proportions of empty habitats ( q 0∕2 , see "Implementation method and data processing" section for a definition), invaders ( q 1∕2 ), native species ( q 2∕2 ), or destroyed habitats ( q 3∕2 ) in the area surrounding native species that can coexist with invaders when introducing habitat destruction and time steps when not introducing habitat destruction (a) or when introducing habitat destruction (b); and panels (c-j) show the spatial distribution of species and habitats when habitat destruction was not introduced (c-f) or when it was introduced (g-j). For panel (a), the natives became extinction before step1400 , and for panel (b), the natives did not become extinct. Therefore, the x axes of panels (a, b) are on different scales. Here, we introduced random habitat destruction. Most of the parameters for the habitat destruction model are shown in Fig. 2, and the other parameters are D end = 50% , t 0 = step150 , and t η = 10steps . The parameters of the invasion model are shown in Table 1 has been identified as a major threat to biodiversity conservation (Pimm and Raven 2000;Gonçalves-Souza et al. 2020;Dri et al. 2021). As a result, we need to study the effect of habitat destruction on biodiversity from a more comprehensive view.
The reasons why the native species density declined slightly during a short time period are that once habitat destruction occurs in an intact habitat, the individual living in it immediately dies (see "Implementation method and data processing" section for this process), and thus, the native species is negatively affected. During habitat destruction, there was a period of time from the appearance of the first destruction event to the last event. After this time, the positive effects of habitat destruction (i.e., separating invaders from native species) appeared and enhanced the long-term survival of native species.
Previous studies demonstrated that the spatial distribution of species can be different (Nunes et al. 2021;Wang et al. 2022), and the forms of dispersal are diverse, depending on the landscape structure, life forms of the species, and dispersal pathways (Greene and Calogeropoulos 2001;Trapp et al. 2019;Day et al. 2020). The initial distribution and dispersal distance are two key factors in determining invasion success (Hastings et al. 2005;Nie and Li 2020). In addition, our results demonstrate that it also impacts the survival of natives after the introduction of habitat destruction. Specifically, if the initial spatial distribution of species is clustered (i.e., clustered distribution and point invasion) or the dispersal distance is shorter (i.e., von Neumann neighbourhood), habitat destruction has more positive impacts on the survival of natives under invasion, and the optimal level of habitat destruction for protecting natives is broader in scope. As a result, exploring how the initial spatial distribution of species and dispersal distance affect the survival of native species under invasion after the introduction of habitat destruction can help control alien species and protect native species by introducing habitat destruction. However, our work on these two factors is limited and further research is required.
For contagious habitat destruction, the initially destroyed habitats are randomly dispersed throughout the landscape, and the destroyed habitats always occur in the neighbours of habitats that have already been destroyed (see "Habitat destruction model" section). Therefore, the location of initially destroyed habitats under contagious habitat destruction may have significant impacts on invasion expansion and native survival. If the location of the initially destroyed habitats is not random but in the cells occupied by invasive alien species, we may obtain similar results to those in a previous study (With 2004) and this study, whereby the spread of invasive alien species is hindered and the natives benefit. However, natives may still not benefit. Since habitat destruction promotes the long-term survival of natives by encompassing natives and separating out invaders (Fig. 10c-j), it may not be beneficial for natives if habitat destruction simply eliminates some invasive alien species but does not separate out invaders. As a result, although the location of initially destroyed habitats may have strong impacts on invasion expansion, whether it can promote native survival still needs further research.
Previous studies have focused on how habitat destruction affects invaders (Didham et al. 2007;Achury et al. 2021), and even if invaders and natives were exposed to habitat destruction, these studies only suggest that the spread of invaders will be slowed (Alofs and Fowler 2010) and that the density of natives remaining in undisturbed habitats will increase (Bolger et al. 2008). We explored whether habitat destruction could enhance the long-term survival of natives when invaders and natives were simultaneously exposed to habitat destruction. The results indicated that habitat destruction could maintain the long-term survival of natives by separating alien invaders from natives, but this influence occurred only part of the time after the introduction of habitat destruction. Furthermore, we investigated how to protect local species by adjusting the method of habitat destruction and found that the intermediate level of habitat destruction should be dispersed throughout the invaded range. Additionally, if habitat destruction was introduced at an earlier time and if the interval between habitat destruction events was shorter, the protective influence was stronger, which was in contrast to previous studies that focused only on whether habitat destruction could maintain the survival of local species (Alofs and Fowler 2010;Liu et al. 2012). In addition, most previous studies have used spatially random habitat destruction models (Brown et al. 2012;Liu et al. 2012), and although spatial heterogeneity has been introduced in some previous models (With 2004;Kinezaki et al. 2010), these models are static over time. Therefore, when and in what order habitat destruction should occur have not been investigated in these studies (Kinezaki et al. 2010;Liu et al. 2012). However, the processes of habitat destruction are dynamic in time and spatially nonrandom (Boakes et al. 2010), and as we have shown, habitat destruction will significantly influence local species under invasion.
Several of our results add weight to previous studies, which have suggested that habitat destruction can inhibit the invasion process (Liu et al. 2012;Barron et al. 2020). Our findings that habitat destruction reduces native species extinction risk driven by invasive alien species (Fig. 3) offer support for this hypothesis. A previous study (Bolger et al. 2008) also indicated that for the native species under invasion, after the occurrence of habitat destruction, the density in the undisturbed habitats was higher than before. Our findings revealed that, compared with not introducing habitat destruction, habitat destruction led to an increase in the density of native species over a period of time after introduction (Fig. 4), and this result offered support for this hypothesis. Previous results have emphasized the importance of considering the spatial structure of habitat destruction when investigating alien species invasion and have suggested that spatially dispersed habitat destruction is not conducive to the spread of invasive alien species (With 2004). Our study suggests that spatially dispersed habitat destruction can better promote the long-term survival of native species facing invaders (Fig. 5).
There are some interesting directions in which our study could be extended. First, we included only one native and one invasive species in this study. In nature, alien invaders always pose threats to many native species and can even threaten an entire ecosystem (Cybèle et al. 2021;Zubek et al. 2022). Thus, we need to extend our model to a multispecies system in future research. Moreover, habitat destruction can transform the native population into an isolated population in our model, and even without habitat destruction, the invasive species can also transform the native population into an isolated population. For the isolated native population, demographic and environmental stochasticity along with genetic drift (Méndez et al. 2010;Miller-Butterworth et al. 2021) will pose a deadly threat. However, in our model, extinction due to these factors has been ignored. Thus, introducing extinction due to demographic and environmental stochasticity into the invasion model is needed in future research. In addition, much of the invasiveness of invasive alien species is derived from their rapid evolution in the new environment (Novak 2007;Prentis et al. 2008). After introduction, environmental pressures, founder effects, genetic drift, and other factors drive alien species to evolve rapidly (Lee 2002;Colautti and Lau 2015;Hagan and Gloag 2021). During these processes, many alien species can adapt to the environment of the invaded range, strengthen dispersal abilities, and gain a competitive advantage over native species (Hänfling and Kollmann 2002;Qin et al. 2013;Szűcs et al. 2017). As a result, we will introduce evolution to this invasion model and study how habitat destruction affects the evolution of invasive alien species, and we then will study how these effects influence the long-term survival of native species.
Since simplicity and a rich array of complex spatiotemporally organized behaviours during invasion and habitat destruction need to be incorporated, we selected a computationally simple method, the cellular automata model. Our model is just one of the beginning studies on the coupled influence of invasion and habitat destruction on species coexistence. We did not capture all of the phenomena observed in the real community. We assumed strong local interactions and discrete spatial extents, which are extremely suitable for the population dynamics of plants, forests and other dispersal limited community scenarios. We also did not connect our model framework with any empirical spatial data that may capture landscape structure, habitat quality, stressor distribution, and other types of information. Therefore, future investigations could extend these invasion mechanisms and habitat destruction methods to more complex framework scenarios. Many advanced behaviourally complex individual-based models, such as Hexsim (Schumaker and Brookes 2018), Rangeshifter (Greta et al. 2014), and TerraME (Tiago et al. 2013), could improve our understanding of species' responses to environmental changes and inform effective management strategies.