In 1710, Sweden lost the territory of modern-day Estonia to the Russian Empire. Subsequently a number of larger reconstruction schemes were carried out and the building complex was effectively turned from a castle into a palace.
By 1710, Sweden had ceded the territory that is now Estonia to Russia. Subsequent renovations and expansions were carried out, effectively converting the castle-like structure into a royal residence.