Around the time of the marauding Vikings, Kenneth MacAlpin, the first king of Scotland, united the Kingdom of Scotland in 843 AD. Also at this time, the Highland clans were emerging (although the majority of clans cannot be authenticated until the twelfth or thirteenth centuries).