After the decline of the Teutonic Order following its defeat in the Battle of Grunwald in 1410, and the defeat of the Livonian Order in the Battle of Swienta on 1 September 1435, the Livonian Confederation Agreement was signed on 4 December 1435.