Jan Guillou's Arn and Birger Jarl
In his Arn triology (later turned into two epic films) Swedish writer Jan Guillou creates the figure of Arn Magnusson, a 12th Century Swedish (or Gothic) noble who as penance must spend 20 years in the Holy Land as a Knight Templar. On his return to Sweden he helps King Erik hold the throne of Sweden (or at least Västergötland) against a pretender and his Danish allies.
Arn's son Magnus is said in the story to be the father of the great earl Birger Jarl, father of two kings, who helped unify much of modern Sweden and Finland into a single realm.
Birger Jarl is a real and important figure in Swedish history, but Arn and his family tree are fiction. The fact that it is possible to convincingly invent an ancestor for so important an historical personage reflects the ambiguities of the medieval period in northern Europe.
The true Birger Jarl was the nephew (and namesake) of the great earl of the previous generation Birger Brosa. Brosa is a major character in the Arn books, but is shifted to being the great uncle of Birger Jarl.
In the sequel to his Arn series, "The Heritage of Arn", Guillou takes up the story of Birger Jarl following the deaths of his father and grandfather, and how he seizes power in Sweden.