AimPrimary productivity is an important mechanism influencing the species richness of animal taxa such as mammals. However, the factors that mediate the relationship between carnivore species richness, for example, and productivity are not well understood. We examined whether the relationship between carnivore species richness and primary productivity followed a hump‐shaped relationship and explored potential pathways by which productivity influences carnivore communities.LocationWestern Great Basin, USA.MethodsWe deployed a camera‐trap grid across a strong precipitation—and the corresponding productivity—gradient and estimated carnivore species richness using a novel application of a multisession community occupancy model. To quantify the relationship between carnivore species richness and productivity, we included the linear and quadratic effects of average annual precipitation as covariates on carnivore species richness. We fit additional community models linking carnivore species richness to vegetation and land cover variables to identify factors that mediate the relationship between carnivore richness and productivity.ResultsThe linear effect of precipitation on carnivore richness was positive and the quadratic effect was negative, supporting the hump‐shaped relationship where richness declines at the highest levels of productivity. Similarly, carnivore species richness followed a quadratic relationship with vegetation height along the productivity gradient. The relationship between carnivore species richness and proportion tree cover was positive, with limited evidence that open vegetation types in the surrounding landscape increased site‐level richness.Main ConclusionsIn addition to supporting the notion that primary productivity has a strong and nonlinear influence on local‐scale carnivore species richness, our results suggest that vegetation structure may be an important mediator of this relationship. Although future changes in precipitation and productivity due to climate change are uncertain, our results indicate that targeting areas of intermediate productivity and vegetation height, such as woodlands, may be key for conserving species‐rich carnivore communities along productivity gradients.