The land of the Treaty of the division of Talava (1224) Tālava s, called Atzeli, was divided between Livonian Order (northern 1/3) and Archbishopric of Riga (Southern 2/3).
For several years, the Livonian Order held the Archbishop of Riga Wilhelm von Brandenburg captive in Gaujiena Castle (1556-1557).
After the end of the war, the King of Sweden Gustav II Adolf in 1625 Swedish Livonia presented the Gaujiena castle district to the State Marshal Axel Baner.
In March 1657, the Swedish army launched a counter-attack and besieged the troops commanded by the Vidzeme Voivodeship at Gaujiena Castle (' 'город Анзел').
In June, the Pskov Voivodeship Matvey Sheremetyev [ru] stopped the siege of Gaujiena Castle, but lost the Battle of Walk.