The next earl was Waltheof and after him Uhtred, who defeated Malcolm II., king of the Scots, in io06.
In 1068, after the failure of the first rising of the north, Edgar retired to Scotland, when his sister Margaret married the Scottish king, Malcolm Canmore.
I n 945-4 6 Strathclyde was ravaged by King Edmund and given over to the Scottish king Malcolm I.
In the 11th century Strathclyde appears to have been finally incorporated in the Scottish kingdom, and the last time we hear of one of its kings is at the battle of Carham in 1018 when the British king Owen fought in alliance with Malcolm II.
William the Conqueror answered this attack by marching into Scotland in 1072, whereupon Malcolm made peace with the English king at Abernethy and "was his man."