During the first years of his reign, he was both popular and prosperous, and ruled well. He recognized the need for Russia to catch up with the intellectual progress of the West and did his best to bring about educational and social reforms. He was the first tsar to import foreign teachers on a large scale, the first to send young Russians abroad to be educated, and the first to allow Lutheran churches to be built in Russia. After the Russo–Swedish War (1590–1595), he pursued gaining access to the Baltic Sea and attempted to obtain Livonia by diplomatic means. He cultivated friendly relations with the Scandinavians and hoped to take a bride from a foreign royal house, thereby increasing the dignity of his own dynasty. However he declined the personal union proposed to him in 1600 by the diplomatic mission led by Lew Sapieha from the Polish–Lithuanian Commonwealth.