During the Livonian War, on 10 June 1570, Duke Magnus arrived in Moscow, where he was crowned King of Livonia by Ivan IV. Magnus took the oath of allegiance to Ivan as his overlord and received from the corresponding charter for the vassal kingdom of Livonia in what Ivan termed his patrimony. The treaty between Magnus and Ivan IV was signed by an oprichnik and by a member of the zemskii administration, the dyak Vasily Shchelkalov. The territories of the new kingdom still had to be conquered, but even so Põltsamaa Castle was proclaimed the future official residence of the king.