As Rome finally withdrew from Britain, Gaelic raiders called the Scoti began colonizing Western Scotland and Wales.According to 9th- and 10th-century sources, the Gaelic kingdom of Dál Riata was founded on the west coast of Scotland in the 6th century.After his victory over the northern tribes at Mons Graupius in 84, a series of forts and towers were established along the Gask Ridge, which marked the boundary between the Lowland and Highland zones, probably forming the first Roman limes or frontier in Scotland.Agricola's successors were unable or unwilling to further subdue the far north.Around 141, the Romans undertook a reoccupation of southern Scotland, moving up to construct a new limes between the Firth of Forth and the Firth of Clyde, which became the Antonine Wall.The largest Roman construction inside Scotland, it is a sward-covered wall made of turf around 20 feet (6 m) high, with nineteen forts. Having taken twelve years to build, the wall was overrun and abandoned soon after 160.Towards the end of the 8th century, the Viking invasions began.Successive defeats by the Norse forced the Picts and Gaels to cease their historic hostility to each other and to unite in the 9th century, forming the Kingdom of Scotland.
The latter was swiftly abandoned and the former overrun, most spectacularly during the Great Conspiracy of the 360s.
James VI, Stuart king of Scotland, also inherited the throne of England in 1603, and the Stuart kings and queens ruled both independent kingdoms until the Act of Union in 1707 merged the two kingdoms into a new state, the Kingdom of Great Britain.
Ruling until 1714, Queen Anne was the last Stuart monarch.
Later, its industrial decline following the Second World War was particularly acute.
In recent decades Scotland has enjoyed something of a cultural and economic renaissance, fuelled in part by a resurgent financial services sector and the proceeds of North Sea oil and gas.