Considering that Gustav IV Adolf was forced to resign and driven to exile during a coup d'etat in 1809 and that the later Bernadotte family got into power after the death of Charles XIII, the brother of the king.
Who would be the Swedish king if the royal family had not been forced into exile by illegal means in 1809? Considering Sweden had primogeniture until 1980. I write illegal here since the coup was not issued by the Swedish parliament and thus can be viewed as such
Princess Sofia Wilhelmina (21 May 1801 - 1865). She married Grand Duke Leopold of Baden, and their granddaughter Victoria of Baden married the Bernadotte king Gustaf V of Sweden. (The present King Carl XVI Gustaf of Sweden is thus Gustav IV's heir.) Source
According to Wikipedia. However, it does not list all her children. If some child of hers or her sisters younger or older would be male, these children would hold a stronger claim than the present king. According to the laws before the coup by the army officers.
You might be interested in this thread in Historum, tracing the heirs of various individual kings and dynasties of Sweden.
And in post number 12 on page two the heirs of the Holstein-Gottorp kings of Sweden including King Gustaf IV Adolf are traced.
And according to that, the heirs of the deposed King Gustav IV Adolph and the new king eventually became united by marriage so the present King Carl XVI Gustaf is the genealogical heir of both.
The line of heirs of the Bernadotte Dynasty is traced in post # 29 on page 3:
But the supporters of both Gustav IV Adolf and Charles XIII might not like the idea of their king's heirs being mingled with and united with the heirs of the other king. So both groups might consider the desendents of the marriage to be barred from the throne for the throne for opposite reasons and the rightful heirs be those next in line.
In my post # 56 on page 6 of that thread I trace who would be the heirs of Gustaf IV Adolf and of the Bernadotte dynasty if people descended from both are excluded.
The heir of King Gustaf IV Adolf would be Maximilian, Margrave of Baden. The heir of the Bernadotte Dynasty would be either King Harald V of Norway or Carl Ludwig Bernadotte (b. 1955), Count Bernadotte of Wisborg.
If we are to disregard the deposition of Gustaf IV Adolf, we should also disregard the new Act of Succession that specified that the male heirs of Charles XIV John would inherit, and instead go to the Act of 23 June 1743, which was the last time previously that the line of succession had been defined. It made Adolf Frederick the heir, and "after him his male direct descendants, according to the Swedish laws of succession"; these laws had been revised in 1719 to be strictly agnatic (From Nordisk Familjebok, "Tronföljd"). Thus, the heirs of the throne in the beginning of 1810 were:
- Prince Gustav
- Duke Charles, later Charles XIII.
No one else had any right to inherit. Neither of them produced any male heirs, and thus the line of succession would have ended with Gustav.
However, this reasoning makes three doubtful suppositions:
- That Gustav IV Adolf would have fathered no more male heirs if he had been allowed to keep his throne.
- That prince Gustav would not have fathered any male heirs if he knew one was needed to inherit the throne.
- That the succession laws would not have been changed in the face of the lack of heirs.