It is not an original observation on my part, but I was again struck this week while I was rereading Sir Thomas Malory how highly similar are the story of King David in the Bible and the story of King Arthur in the versions of his history handed down from Geoffrey of Monmouth to Tennyson.
As young boys, both David and Arthur perform feats of strength that eventually lead to their kingships. Arthur pulls a sword from a stone, and David slays Goliath and so gains the attention of King Saul and of the entire nation. To secure his kingdom, Arthur must defeat the eleven kings who gather their forces against him, while David must await the death of King Saul before he can rule. (There is a hint of the illegitimate that adheres to both rulers even after they take their thrones. Was David in the cities of the Philistines when Saul and Jonathan were killed? Why does Arthur need the symbols of his court and his magical sword to prove his royal blood?)
Arthur has a wife who has an adulterous affair with a trusted warrior (Galahad) in his court. David gets a new wife (Bathsheba) by betraying a trusted warrior (Uriah). Arthur has bevy of trusted knights. David has Joab and a host of other warriors. David owns the Arc of the Covenant, and Arthur has Excalibur.
David gets his ultimate betrayal from his son Absalom. Arthur gets his from his son (or nephew, we don't know for sure) Mordred, who mortally wounds him. David receives spiritual guidance from the prophet Samuel. Arthur gets his from the mystical Merlin.
Both stories end before there is true fulfillment for either man. David must endure a terrible old age and is never allowed to build the Temple. Rather than dying, Arthur is taken to Avelon, whence he will one day return to save his people; as he goes, he leaves them in chaos.
There may have been a real Arthur in Britain after the Romans left the island, but whomever he really was, the churchman Geoffrey gave him the qualities of David in order to create an appropriate national myth.