sentences:  In 1645 it was ceded from Denmark to Sweden by the Treaty of Brömsebro.During the Livonian War in 1561, northern Estonia submitted to Swedish control, while southern Estonia briefly came under the control of Poland in the 1580s.In 1625, mainland Estonia came entirely under Swedish rule.