An analysis was made of the foraminiferal paleoecology of the middle Tertiary in wells of the San Joaquin Valley, California. This province, which represents the southern half of the Great Valley of California, is bounded on the east by the Sierra Nevada, on the south by the Tehachapi Mountains, on the west by the Coast Ranges, and on the north it joins the Sacramento Valley near Stockton. The marine basin of this study is known as the San Joaquin Basin, and it is located in the southern half of the San Joaquin Valley. Thirteen biofacies are established for the recognition of thirteen paleobathymetric zones between depths of 0 and more than 6000 feet. In the Oligocene and lower Miocene, maximum water depths of the marine basin were abyssal, in excess of 6000 feet; basin filling brought about a decrease to lower bathyal depths during the middle Miocene; rapid sedimentation during the later Miocene resulted in shoaling of the basin to neritic depths in latest Miocene and Pliocene. Most of the better zonal index species are bathyal or lower neritic types; those with the longest stratigraphic ranges appear to be the abyssal and upper neritic assemblages. The primary deep-water connection between the San Joaquin Basin and oceanic waters to the west was consistently at the southwestern corner of the basin across the San Andreas fault. Evidence for this is the continuous dominance of deep-water facies in the southern part of the basin extending westward to the San Andreas fault. Further support is to be seen in the restriction of planktonic foraminiferal facies and radiolarians to the southern areas. Frequencies of planktonic foraminiferans are generally greatest in the southern area near the San Andreas fault, showing decreasing values away from the San Andreas fault around the southern part of the basin in a counterclockwise direction. This pattern indicates that the principal oceanic current entered the basin across the San Andreas fault and moved in a counterclockwise pattern during most of the middle Tertiary. Biofacies to the west of the San Andreas fault do not generally indicate a continuation of deep-water conditions there; right-lateral movements on the San Andreas fault have probably moved the western continuation of these deep-water basin facies far to the north. A comparison of subsidence and sedimentation rates shows about subequal rates at first in the Oligocene, somewhat greater rates of deposition than subsidence during most of the Miocene, and far greater rates of deposition than subsidence in the later Miocene. Throughout the middle Tertiary various tectonic blocks within the San Joaquin Basin apparently moved independently and continuously. More than 5000 cubic miles of rock represent the marine sediment deposited in the San Joaquin Basin during the middle Tertiary stages. Of this amount, more than 4000 cubic miles were deposited in depths of water greater than 300 feet, and most of the oil produced in the basin comes from these strata.