Mindaugas had signed a peace treaty with them. Samogitia for 200 years played a crucial role in halting the expansion of the Teutonic Order and defeated the Knights of the Sword in the Battle of Saule (1236) and the Livonian Order in the Battle of Skuodas (1259), and the Battle of Durbe (1260). In the atmosphere of fierce battles with the Teutonic Knights, the Lithuanian rulers Jogaila and Vytautas several times ceded Samogitia to the Teutonic Order in 1382, 1398 and 1404. However, the Teutonic Knights were not successful in subjugating the land, and Samogitians revolted in 1401 and 1409. After the defeats in the Battle of Grunwald (1410) and following wars, in 1422 the Teutonic Order ceded Samogitia to the Grand Duchy of Lithuania under the Treaty of Melno. Samogitians were the last in Europe to accept Christianity in 1413. During the Christianization of Samogitia, none of the clergy, who came to Samogitia with Jogaila, were able to communicate with the natives, therefore Jogaila himself taught the Samogitians about the Catholicism, thus he was able to communicate in the Samogitian dialect of the Lithuanian language. The Grand Duke of Lithuania Casimir Jagiellon acknowledged the autonomy of Samogitia in the Grand Duchy of Lithuania and then issued a privilege to the Eldership of Samogitia to elects its own elder (starost) in 1441. Because of its prolonged wars with the Teutonic Order, Samogitia had developed a social and political structure different from the rest of Lithuania. It had a larger proportion of free farmers and smaller estates than in Eastern Lithuania. As with most of the Polish–Lithuanian Commonwealth, Samogitia suffered in the aftermath of the Swedish invasion of Commonwealth (the Deluge, mid-17th century). Its population dropped from close to 400,000 to about 250,000; only to return to 400,000 by the late 18th century. After the annexation of Lithuania by Imperial Russia, Samogitia was included in the Vilna Governorate (southern extreme was detached for New East Prussia and so on); in 1843 it was transferred to a newly established Kovno Governorate. At the beginning of the 19th century Samogitia was the center of the Lithuanian national revival, which stressed the importance of the Lithuanian language and opposed russification and polonization attempts. Elders of Samogitia The General Starosts of Samogitia (equivalents of voivodes) included: Rumbaudas Valimantaitis (1386–1413) (?) Mykolas Kęsgaila (1412–1432, 1440–1441, 1443–1450) Jonas Kęsgaila (1451–1485) Stanislovas Kęsgaila (1486–1527) Stanislovas Kęsgaila (1527–1532) Jan