Ground motions at distances of 20 to 30 km from two moderate earthquakes, which occurred along the San Andreas fault zone in central California on February 24, 1972 (M = 5.0) and on September 4, 1972 (M = 4.6), were well recorded at two stations on quite different crustal structures astride the fault. The similarity of the focal mechanisms and the observed spectra at each station, for both earthquakes, makes it possible to apply the spectral ratio method for evaluating Q for direct shear waves propagating along and adjacent to the fault zone. The resultant linear relations between the average values of Q of SH waves for the wave paths from both earthquakes to each station, together with a few reasonable assumptions, suggest the following properties of the variation of Q in the upper crust: In the fracture zone of Tertiary and Cretaceous sedimentary rocks along the fault to the northeast of the Gabilan range, the average Q in the upper 6 km is as low as 20. Although less certain, under the northeastern part of the Gabilan range composed of Mesozoic granites southwest of the fault, the average Q in the upper 6 km is about 100 or more and the intrinsic Q begins to decrease at a depth of several kilometers. This depth corresponds to the bottom of the well-defined zone of aftershock occurrence following moderate earthquakes.