The Battle of 839, also known as the Disaster of 839 or the Picts’ Last Stand, was a battle fought in 839 between the Vikings and the Picts and Gaels. It was a decisive victory for the Vikings in which Uuen, the King of the Picts, his brother Bran and Aed son of Boanta, King of Dál Riata, were all killed. Their deaths led to the rise of Kenneth I and the formation of the Kingdom of Scotland, as well as the disappearance of Pictish identity. It has therefore been described as "one of the most decisive and important battles in British history."

Background

Vikings had been raiding Britain since the late eighth century. In 793, the monastery at Lindisfarne was sacked. Iona Abbey was also repeatedly attacked by Vikings. In 802, the Annals of Ulster note that "Iona was burned by the heathens", in 806 it states that "the community of Iona, to the number of sixty-eight, was killed by the heathens" and in 825 the monk Blathmac was brutally killed during a Viking raid.

During this time the two main powers in northern Britain were the kingdoms of Pictland and Dál Riata. However, despite these coastal Viking raids, there are no recorded conflicts between these kingdoms and the Vikings until 839.

The Battle
Very little about the battle is known. The only contemporary account is given in the Annals of Ulster. Under the year 839 it states:

The appearance of Aed along with "almost innumerable others" suggests that this was a large battle and probably the culmination of a campaign that had allowed Uuen enough time to gather a large force. Aed's appearance fighting alongside the men of Fortriu also suggests that he had given an oath of allegiance to Uuen and that the Kingdom of Dál Riata was under the dominion of the Picts.

Location
The location of the battle is currently unknown. The record of the battle given in the Annals of Ulster doesn't mention any location; however, it is possible that it took place within Fortriu and probably close to the sea. Fortriu was the core territory of Pictland and was likely based around Moray and Easter Ross.  Therefore, a possible location could be near the shores of the Moray Firth.

Aftermath
Uuen was the last King of the house of Fergus, which had dominated Pictland for at least 50 years and his decisive defeat against the Vikings lead to a period of instability in northern Britain. Into this chaos emerged  Kenneth I.

Later sources provide some information about the years following the battle. The list of Pictish Kings (probably written in the late 10th century) preserved in the Poppleton Manuscript state that Uuen was followed by  Uurad son of Bargoit who reigned for 3 years and then Bred who reigned for 1 year and then Kenneth. 
Another list, sometimes referred to as the Q list, suggests Kenneth's early years were disputed. It follows Bred with Kenneth son of Uurad who reigned for 1 year, then  Bridei son of Fochel who reigned for 2 years, then  Drest son of Uurad who reigned for 3 years. The first contemporary source to mention the Picts after the battle states that in 858 "Kenneth son of Alpin, King of the Picts, died."

Kenneth provided stability to northern Britain, uniting the Kingdoms of Pictland and Dál Riata, and he is considered by many to be the founder of Scotland. Under the House of Alpin, outsiders stop making references to the Picts and a gradual process of Gaelicisation takes place, where the Pictish language and customs are replaced. In the 12th Century, Henry of Huntingdon writes that "the Picts, however, appear to have been annihilated and their language utterly destroyed, so that the record of them in the writings of the ancients seems like fiction."

References

Sources 
 

Battles
Kingdom of Scotland
Picts
Vikings