In 1995 it merged with Njarðvík and Hafnir to form a municipality called Reykjanesbær with a population of 15,233.
Founded in the 16th century, Keflavík developed on account of its fishing and fish processing industry, founded by Scottish entrepreneurs and engineers. Later its growth continued from flight operations at the Keflavík International Airport which was built by the US during the 1940s. The airport used to hold a significant NATO military base and was a vital pre-jet refueling stop for trans-Atlantic commercial air traffic. It now serves as Iceland's main international hub.
During World War II the military airfield served as a refueling and transit depot. During the Cold War, Naval Air Station Keflavik played an important role in monitoring marine and submarine traffic from the Norwegian and Greenland Seas into the Atlantic Ocean. Forces from the United States Air Force were added to provide radar monitoring, fighter intercept, in-flight refueling, and aerial/marine rescue. After the collapse of the Soviet Union, however, the base's role was cast into doubt. The base officially closed on 30 September 2006, when the United States withdrew the remaining 30 military personnel.
In Iceland, Keflavík was renowned as a rich source of musicians during the 1960s and 70s, and is therefore also known as bítlabærinn or "The Beatle Town".
The local geography is dominated by fields of basalt rubble, interspersed with a few hardy plants and mosses. On a clear day, one can see Snæfellsjökull across the bay, some 115 km away.
The climate of Keflavík is subpolar oceanic with cool summers and moderately cold winters. There is no truly dry month but July is the month that gets the least amount of precipitation. Winter high temperatures average above the freezing mark, and summer high temperatures are cool to mild. The warmest month on average is July with an average high of 13 °C (55 °F) and the coldest is January with an average high of 2 °C (36 °F).
The town is represented in sports by Íþrótta- og ungmennafélag Keflavíkur.
The former NATO military base Naval Air Station Keflavik is used as a setting for an important story line in Tom Clancy's novel Red Storm Rising. Clancy described the base, the geography, local flora, and the station equipment.