Viking raids from 840 onwards contributed to the decline of Hamwic in the 9th century, and by the 10th century a fortified settlement, which became medieval Southampton, had been established.