Abstract:Utilizing panel data from 277 urban areas in China spanning from 2011 to 2019, this study scientifically measures the level of economic resilience in the agricultural sector through counterfactual methods. Employing the system GMM model, mediation model, and dynamic threshold model, it empirically tests the impact and mechanism of the digital economy on the economic resilience of urban agriculture. The findings reveal that the digital economy significantly enhances the economic resilience of urban agriculture, a conclusion which remains robust after a series of stability tests. Mechanism analysis indicates that the deepening of agricultural capital is a critical pathway through which the digital economy improves the economic resilience of urban agriculture. Heterogeneity analysis shows that the effect of the digital economy on economic resilience is more pronounced in the eastern, central, and western regions, as well as in areas with higher levels of human capital, whereas its enhancement effect is not significant in the northeastern region. Dynamic threshold tests further reveal a marginally increasing non-linear characteristic in the impact of the digital economy on the economic resilience of urban agriculture. Specifically, when the level of digital economy development crosses a specific threshold value (0.147), its role in promoting economic resilience is significantly strengthened.