In 1953, the need to connect the capital, Riyadh, to the oil-rich economically prosperous regions in the east and the Islamic holy sites to the west arose.
In 1965, the western section of the highway connecting Riyadh and the Islamic holy sites in the west was completed as the primary east–west axis of the kingdom.
There are numerous rest areas along the highway, with some having the most basic of amenities such as just a petrol station and cafe, with others including restaurants, hotels, fast-food franchises, and almost all of them have a masjid, with recent regulations stating that there should be a travel time of no longer than 60 minutes between rest areas.
Between the two boundaries of the haram surrounding Mecca, Highway 40 turns northward and then back east along the northern perimeter of the holy city and even through the Jannat al-Mu'alla cemetery before turning back northeast toward Riyadh and exiting Mecca passing just south of Jabal al-Nur.
[8] For speed limit enforcement, most of the western portion of the highway uses radar, while the eastern and central parts use traditional cameras.
Fog-prone areas, especially in the eastern parts, are marked with huge signs with light warnings and the speed limit is reduced to 15 kilometres per hour (9.3 mph) in the case of fog.
[9] In February 2018, it was announced that the speed limit on key highways in the Saudi road network was being raised to 140 kilometres per hour (87 mph) from the previous 120 kilometres per hour (75 mph) for private vehicles, and Highway 40 was included in these.
With the arrival of petrodollars, the rise of the Saudi middle class and an increase in private vehicle ownership, the need to connect the Saudi capital to the Eastern Province and to the Islamic holy sites in the west by road arose in 1953 and the Ministry of Transport was founded the same year.
[2][8] The Riyadh–Dammam section of the highway was completed first in 1961, owing to Dammam's closer distance to Riyadh as well as the attraction of economic prosperity from the oil-rich regions in the east.