Answer
Sophia Magdalena was married to King Gustav III of Sweden. He ascended to the throne in 1771, after his father was assassinated. Gustav III was a popular monarch, and his reign saw a period of great cultural and economic growth in Sweden. However, he was also autocratic and controversial, and his rule was eventually ended by a coup d'etat in 1792.