Gustav III, King of Sweden, was born in Stockholm, the eldest son of King Adolph Frederick and his wife Queen Louisa Ulrika of Prussia. In 1766, he married Sophia Magdalena of Denmark, with whom he had two children. He succeeded to the throne in 1771 and reasserted royal power over the Swedish Riksdag (Parliament), taking more power into his own hands and establishing a new constitution. He founded the Swedish Academy in 1786. His reign became known as the Gustavian, or Swedish, Enlightenment because of his numerous social and political reforms and his vigorous patronage of the arts. The king wrote plays and essays himself and collaborated with Johan Kellgren on the opera Gustaf Wasa (1786). Some of these reforms outraged the nobility, and he was assassinated by three young aristocrats in the foyer of the Royal Opera House in Stockholm during a masked ball in 1792. His death was the basis of an opera libretto by Eugène Scribe that, with specifics changed due to censorship, was used by Giuseppe Verdi in 1859 for his Un Ballo in Maschera.