In AD 71 the Romans built a garrison called Eboracum, which in time became a large fort with a civilian settlement around it. Hadrian used it as the base for his northern campaign, while Constantine the Great was proclaimed emperor here in AD 306. When the Roman Empire collapsed, the town was taken by the Anglo-Saxons, who renamed it Eoforwic and made it the capital of the independent kingdom of Northumbria.

In 625 a Roman priest, Paulinus, arrived and converted King Edwin and his nobles to Christianity; two years later they built the first wooden church here. For most of the next century, the city was a major centre of learning, attracting students from all over Europe. In 866 the next wave of invaders arrived, this time the Vikings, who gave the town a more tongue-friendly name, Jorvik. It was their capital for the next 100 years, and during that time they turned the city into an important trading port.

King Eadred of Wessex drove out the last Viking ruler in 954 and reunited Danelaw with the south, but trouble quickly followed. In 1066 King Harold II fended off a Norwegian invasion at Stamford Bridge, east of York, but was defeated by William the Conqueror a few months later in the Battle of Hastings.

After William's two wooden castles were captured by an Anglo-Scandinavian army, he torched the entire city (and Durham) and the surrounding countryside. The Normans then set about rebuilding it, adding a grand new minster. Over the next 300 years York (a contraction of the Viking name Jorvik) prospered through royal patronage, textiles, trade and the Church.

Throughout the 18th century the city was a fashionable social centre dominated by the aristocracy, who were drawn by its culture and new racecourse. When the railway arrived in 1839, thousands of people were employed in new industries that sprang up around it, such as confectionery (the Terry's and Rowntree's brands were founded here). These industries went into decline in the latter half of the 20th century, but by then a new invader was asking for directions at the city gates, armed only with a guidebook.