Peace of Brześć Kujawski was a peace treaty signed on December 31, 1435 in Brześć Kujawski that ended the Polish–Teutonic War (1431–1435). The treaty was signed in the aftermath of the Livonian Order's defeat at the hands of the allied Polish-Lithuanian force in the Battle of Pabaiskas (Wiłkomierz). The Teutonic Knights agreed to cease their support to Švitrigaila (who tried to break the Polish-Lithuanian union) and in the future to support only Grand Dukes properly elected jointly by Poland and Lithuania. The treaty did not change borders determined by the Treaty of Melno in 1422. The Peace of Brześć Kujawski showed that Teutonic Knights lost their universal missionary status. Teutonic and Livonian Order no longer interfered with Polish–Lithuanian affairs; instead Poland and Lithuania involved themselves in the Thirteen Years' War, the civil war in Prussia that tore it in half.