The Kern County area was first claimed by the Spanish in 1769. In 1772, Commander Don Pedro Fages became the first European to enter the area. The expedition entered via the Grapevine Canyon (later the site of the Ridge Route along U.S. 99 and now Interstate 5). Walker Pass was discovered in 1834 and is an important pass across the Sierra Nevada as it is one of the few not closed by winter snows. It is now a National Historic Landmark. In 1848, the Kern area was ceded to the United States as part of the transfer of California, Nevada, and Utah and other lands under the Treaty of Guadalupe Hidalgo.The Havilah Court building was restored in the 1970s and now serves as a museum. Photo circa 2007.
Kern County was created in 1866 with the county seat located in the now abandoned mining town of Havilah. In its beginning, Kern County was dominated by mining in the mountains and desert. The area of the San Joaquin Valley was considered inhospitable and impassable at the time due to swamps, lakes, tule reeds, and diseases such as malaria. This changed when settlers started draining lands for farming and constructing canals, most dug by hand by hired Chinese laborers, to irrigate and drain these lands. Within 10 years the area of the San Joaquin Valley surpassed the mining areas as the economic influence of the county, and the county seat was moved from Havilah to Bakersfield in 1874.
Tensions between Native Americans (mostly Mohave and Paiutes) following attacks on miners and encroaching settlers in the mountains turned deadly on several occasions. Most notably the ghost town of Keyesville is the location where 5 Indians were killed in 1856, and another 35 in were killed by soldiers in the 1863 Keyesville Massacre. Relations with other tribes were more cordial. The Haidu lived on the Tejon Ranch under General Edward Beale's protection on Ranchos, and relations between Beale and the Chiefs were cordial. The Yokut Indians of the San Joaquin Valley were peaceful and friendly. Spanish explorer Father Francisco Garces befriended the Yokuts at villages at the present day Garces Circle. They lived in Hogans along the branches of the Kern River Delta and hunted antelope, tule elk, deer, grizzly bear, fish, and game birds. The Yokuts for the most part died from diseases, with a few assimilating into the white man's culture. The Haidu assimilated into the local population with most intermarrying with Spanish/Mexican Californios. Many of the Paiute still live in the mountain areas of eastern Kern County, with no reservations in Kern County as in other counties. However, the less than 100 descendants of the Haidu near Kern City attempted to reorganize as the Rio Bravo Indian Rancheria in the late 1970's.
Kern County was the site of the Battle of San Emigdio, in March 1824, between the Chumash Indians of the Santa Barbara Mission who rebelled against the Mexican government's taking over mission property and ejecting the Indians. This battle between Mexican forces from Monterey under the command of Cárlos Carrillo occurred at the canyon where San Emigdio Creek flows down San Emigdio Mountain and the Blue Ridge south of Bakersfield near Highway 166. It was a low-casualty encounter, with only four Indians killed, and no Mexicans; the surviving Indians were pacified and brought back to Santa Barbara in June 1824, after a pursuit and negotiation in which many were allowed to keep their arms for the return march over the mountains.
Former U.S. Ambassador and U.S. Army General Edward Beale established and owned the large Tejon Ranch in the mountains south of Bakersfield. It was the consolidation of four separate Mexican Ranchos he purchased in 1846 after his part in winning California independence in the Bear Flag Revolt against corrupt and inept Mexican government officials. Today, the Tejon Ranch is the largest tract of privately owned land in California. The Beale Memorial Library, Beale Avenue, General Beale Road, The Beale Memorial Clock Tower, Beale Park, and Truxtun Avenue are named after the influential Beale family, both for Edward and his wife, and their son Truxtun.
In 1854 the First Regiment, U.S. Dragoons established Fort Tejon near the head of the Grapevine Canyon. The post's mission was protecting peaceful Indians living on the nearby Tejon Indian Rancherias, as well as safeguarding miners from raids by hostile Mohave and Paiute Indians. The Indians of the Tejon Ranch, most of whom were Haidu, assimilated into the local population and the Rancherias no longer exist. Located next to the Ridge Route (now Interstate 5) just north of the town of Lebec, the fort is a California State Historical Park featuring living history programs and Civil War re-enactments (although no Civil War battles were fought there).
Kern County was formed in 1866 from parts of Los Angeles and Tulare Counties. The county derives its name from the Kern River which was named for Edward Kern, cartographer for General John C. Fremont's 1845 expedition, which crossed Walker Pass. The Kern River was originally named Rio Bravo de San Felipe by Father Francisco Garces when he explored the area in 1776. Kern County was nearly named Buena Vista County for the large, and now drained, Buena Vista Lake between Bakersfield and Taft. The western half of Kern county being on the southern end of the Central Valley was regarded as infertile or semi-desert (chapparral) with less than 10,000 residents in the entire county, according to the 1866 population report.
Oil development began in the late 19th century, with the 1894 discovery of the enormous Midway-Sunset Oil Field, the third-largest in the United States. It was on this field, in the southwestern portion of Kern County near Maricopa, that well drillers brought about the 1910 Lakeview Gusher, the largest recorded oil gusher in U.S. history. The oil well spewed approximately 9 million barrels for a year and a half onto the adjacent landscape before workers finally were able to cap it. Other huge oil fields in southwestern Kern County discovered early in the 20th century include the Buena Vista Field, the South Belridge Field, and the Cymric Field, which is currently the fastest-growing field in California in terms of barrels produced per year.
Elk Hills, another one of the large oil fields in Kern County, was involved in the Teapot Dome Scandal, an infamous example of corruption of President Warren G. Harding's administration. In 1923 it was revealed that Harding's Secretary of the Interior, Albert Fall, transferred portions of the naval petroleum reserves into private hands without competitive bidding, and in the case of Elk Hills, in exchange for personal 'loans.' The illicit deals involved the reserves at Elk Hills and at Teapot Dome in Wyoming. The Supreme Court in 1927 returned Elk Hills to public ownership, and it became the U.S. Naval Petroleum Reserve No. 1; this was to remain until 1997 when the Department of the Interior sold it to Occidental Petroleum.
On July 21, 1952, an earthquake with epicenter in Kern County measuring 7.3 on the Richter scale killed 12 people. The Kern County earthquake was the largest earthquake to strike Southern California since the Fort Tejon earthquake of 1857 and the Lone Pine earthquake of 1872, causing immense and widespread damage. In addition to 12 fatalities, it was responsible for at least 18 injuries and over $50 million in property damage. It was followed by several aftershocks, at least 20 of which were magnitude 5.0 or greater. The quake occurred on the White Wolf Fault and was the third strongest quake in California history, behind the 1906 San Francisco earthquake and the 1872 Lone Pine quake.
As home to Edwards Air Force Base the Air Force's main flight test facility, Kern County has been the site of many milestones, including the first supersonic flight and the first landing of the Space Shuttle. Kern County is also the home of the first inland spaceport in the United States, the Mojave Spaceport. Kern County is also home to the China Lake Naval Air Weapons Station at Ridgecrest where many naval weapons were (and continue to be) developed and tested.
Between 1983 and 1986, several ritual sex ring child abuse cases allegedly occurred in Kern County. These resulted in numerous long prison sentences, all of which were overturned, some only decades later, because the prosecutors had coerced false testimonies from the children.  The Kern County cases marked the beginning of a series of similar cases all over North America and beyond. Kern County was used as a dropoff place for paroled sex offenders, as part of California Dept, of Probation policies to relocate them in rural areas 100 miles (160 km) from Los Angeles or San Francisco (urban centers).
According to the U.S. Census Bureau, the county has a total area of 8,161 square miles (21,138 km²), of which, 8,141 square miles (21,085 km²) of it is land and 20 square miles (53 km²) of it (0.25%) is water.