The Roskilde bishops owned large areas of land in the region including, from 1186, Havn on the Øresund which later became Copenhagen.
In the 1970s, the city benefited from the opening of the university and from the completion of the Holbæk Motorway connecting it to Copenhagen.
Roskilde has the oldest operational railway station in Denmark, with connections across Zealand as well as with Falster, Lolland, and Jutland.
Absalon, the Danish bishop, had a brick church built on the site of Harald's church in 1170.
Today's cathedral was completed in 1275 after five of Absalon's successors had contributed to its construction.
According to Adam of Bremen and the Saxo Grammaticus, Roskilde was founded in the 980s by Harald Bluetooth.
On high ground above the harbour, he built a wooden church consecrated to the Holy Trinity as well as a royal residence nearby.
With the development of the rail network in the 19th century, Roskilde became an important hub for traffic with Copenhagen, and by the end of the century, there were tobacco factories, iron foundries and machine shops.
Among the largest private sector employers today are the IT firm BEC (Bankernes EDB Central) and GPI (Glim Plastic Industri), specializing in plastics.
The local airport opened in 1973, mainly serving light aircraft for business use and flight instruction.
Among the city's notable citizens are Absalon, the bishop who founded Copenhagen in the 12th century, L. Ring, the symbolist painter who gained fame in the 1880s, the writer Lise Nørgaard who wrote the popular Danish TV series Matador in 1978 and the rower Thomas Ebert who became an Olympic gold medallist in 2004.
By the end of the century, there were tobacco factories, iron foundries and machine shops.