Frederick IV, Duke of Holstein-Gottorp

He was born in Gottorf Castle as the elder son of Duke Christian Albert of Holstein-Gottorp and Princess Frederica Amalia of Denmark.

According to Robert Massie's Peter the Great: His Life and World, Duke Frederick arrived in Stockholm to marry his cousin, Princess Hedwig Sophia, soon befriending his first cousin and new brother-in-law, King Charles XII (their respective mothers, Frederica Amalia and Ulrika Eleonora, being daughters of Frederick III of Denmark).

Duke Frederick and King Charles regularly participated in wild festivities, drinking binges, and outlandish pranks.

As it happened, according to Massie in the aforementioned book, the 17-year-old King Charles, in the summer of 1699, pushed himself to an unbearable point of excess and vowed never to touch another drop of liquor again.

As for his relationship with his cousin Frederick, they remained on good terms, so much that King Charles gave him military assistance to defend Holstein-Gottorp from Danish invasion.