The three-dimensional P-wave velocity structure in the upper crust in the northern California Coast Ranges from Santa Rosa to Ukiah is obtained by simultaneous inversion of local earthquake and refraction travel-time data for velocity and hypocentral parameters. In this region, where there are lateral heterogeneities, the three-dimensional inversion provides important results not found in two-dimensional refraction studies. The medium is parameterized with velocities at the intersections (gridpoints) of a nonuniform three-dimensional grid. Travel times are calculated with approximate ray tracing along arcuate paths, which are reasonable for lateral distances less than 45 km. Inversions with 5 to 10 and 2 to 3 km gridspacing achieved 80 per cent decreases in data variance. The inversion with 2 to 3 km gridspacing reduced the rms residual level to approximately the level of timing error. Anomalously low velocities to at least 6 km depth are found along the Maacama and Healdsburg-Rodgers Creek (HRC) fault zones. The low-velocity region is widest at the en-echelon junction of the Maacama and HRC fault zones. Low velocities are associated with the Clear Lake basin where there is a thick sequence of volcanics interbedded with sedimentary deposits. There is a high-velocity body, located southeast of The Geysers between the Maacama and Collayomi fault zones, which may be associated with igneous intrusives or high-grade metamorphism related to an underlying inferred partial-melt body, modeled in previous teleseismic travel-time studies. There is some indication in the vapor-dominated geothermal reservoir of lower velocities relative to surrounding water-saturated rock, as has been shown in some laboratory experiments. Hypocenter locations obtained in the inversion show little variation from hypocenters obtained through inversion for one-dimensional velocity model and station corrections. For the inversion with 2 to 3 km gridspacing, however, some groups of events become more tightly clustered.