Ecological Security (ES) is an essential safeguard for regional sustainable development. Scientifically elucidating the multiscale evolution of ES patterns and their driving mechanisms is critical for ecological governance and conservation in Mountainous Urban Agglomerations (MUAs). Taking the central Yunnan Urban Agglomeration (CYUA) as a representative MUA, this study constructs a three-dimensional ES assessment framework integrating ecological health, ecological sensitivity, and ecological risk. By integrating ES slope-spectrum analysis with spatial autocorrelation, Geodetector, Multiscale Geographically Weighted Regression (MGWR), and machine learning, we analyze the spatiotemporal evolution of regional ES patterns and their driving mechanisms from a multiscale perspective. Results show that from 2000 to 2020, ES in the CYUA exhibited an overall improving trend with clear scale dependency. At the micro-scale, urban expansion intensified ecological fragmentation, whereas at the macro-scale, regional integration under policy guidance was evident. ES shows significant differentiation along slope gradients, forming a typical pattern of “low-slope–high-risk and high-slope–high-security,” with the 10–25° interval identified as a “conflict front” between ecological conservation and urban development, facing elevated degradation risks. Human Activity Intensity (HAI) is the dominant driver of ES spatial differentiation, with a critical pressure threshold of 0.29, and exhibits significant nonlinear interactive effects with slope and NDVI, with q-values exceeding 0.6. Overall, this study reveals complex human–environment interactions in MUAs and provides scientific evidence for balancing topographic constraints with urbanization, optimizing territorial spatial patterns, and promoting coordinated development of ecological conservation and high-quality urbanization.
Chen et al. (Mon,) studied this question.