Estimating population density and identifying those areas where density is changing through time are central to prioritizing conservation and management strategies. Obtaining reliable estimates of density and trends can be challenging, however, especially for long‐lived species that are rare, have broad geographic distributions, and are difficult to detect reliably during field surveys. We developed a hierarchical model for distance‐sampling data that characterizes spatial variation in density at two scales and simultaneously estimates regional trends while accounting for variation in detection probability and availability across surveys. We applied the model to data collected over a 20‐year period (2001–2020) in an area that encompassed most of the geographic range of the Mojave desert tortoise (Gopherus agassizii). Density of adult tortoises varied with multiple biotic and abiotic features, including topography, aspect, geology, and seasonal precipitation and temperature regimes. Across the entire period and study area, the density of adult tortoises decreased by an average of 1.8% per year (95% CI = −3.5% to −0.2%). Trends varied geographically, however, with the steepest declines in the western part of the range (−4.1%, −6.9% to −1.3%). Accounting for habitat loss across our study area, the abundance of this threatened species declined by an estimated 129,000 adults (36%) between 2001 and 2020. Our modeling approach extends traditional distance‐sampling frameworks by accounting for ecological and observational processes that could mask spatiotemporal variation in density and, at the same time, provides spatially explicit estimates to guide conservation and management strategies for tortoises and other rare species.