I-5 continues along the western city limits of Santa Clarita and passes Six Flags Magic Mountain, intersecting SR 126 just north of there. The Golden State Freeway then rises sharply, passing by Lake Castaic and undergoing a unique crossover resulting in a left-driving configuration for about 5 miles before the highway crosses back into its standard alignment. This stretch also boasts the second-largest median in California after I-8's In-Ko-Pah grade. It passes Pyramid Lake and intersects SR 138 before crossing the Tejon Pass through the Tehachapi Mountains, with Path 26 power lines generally paralleling the freeway. After entering Kern County, the freeway sharply descends for from at the Tejon Pass to at Grapevine near the southernmost point of the San Joaquin Valley, approximately south of Bakersfield and south of its interchange with SR 99 at Wheeler Ridge.