Between the 13th and 15th centuries, the inhabitants of Palanga had to confront the Teutonic Knights in the south and the Livonian Brothers of the Sword in the north. Their adversaries were unable to achieve their goal of capturing the Lithuanian sea-coast from Klaipėda to Šventoji. Although Klaipėda (Memel) passed into the hands of the German feudal lords under the Treaty of Melno, in 1422, Palanga and Šventoji remained under Lithuanian control.