Although soil viral abundance, diversity, and potential roles in microbial community dynamics and biogeochemical cycling are beginning to be appreciated, little is known about the patterns and drivers of soil viral community composition that underlie their contributions to terrestrial ecology. Here, we analyzed 43 soil viromes from a precipitation manipulation experiment in a Mediterranean grassland in California, USA. We recovered 5,315 viral population sequences (vOTUs), and viral community composition exhibited a highly significant distance-decay relationship within the 18 m long field. This pattern was recapitulated in the microheterogeneity of 130 prevalent vOTUs (detected in >=90% of the viromes), which tended to exhibit significant negative correlations between genomic similarity of their predominant allelic variants and distance. Although spatial turnover was also observed in the bacterial and archaeal communities from the same soils, the signal was dampened relative to the viromes, suggesting differences in assembly drivers at local scales for viruses and their microbial hosts and/or differences in the temporal scales captured by viromes and total DNA. Despite the overwhelming spatial signal, vOTUs responsive to a decrease in soil moisture were significantly enriched in a predicted protein-sharing subnetwork of 326 vOTUs linked to 191 known actinobacteriophages, suggesting a genomically cohesive viral response to soil moisture evocative of environmental filtering, potentially by way of actinobacterial hosts. Overall, soil viral ecological processes appear to be highly constrained in space and tightly coupled to the heterogeneous, dynamic soil environment and thus fundamentally different from those of their well-mixed and more thoroughly studied marine counterparts.