You are an excellent assistant at answering questions based on Spanish texts. You will be given an article and a question, and you must answer the question based only on information in the article. The response should be extracted from the context verbatim.

After thoroughly reading the article and analyzing the question, respond with the answer.

Title:
Southampton

Context:
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.

Question:
What year did the Vikings start attacking Hamwic?

840