The Livonian Order had been fighting the Samogitians since 1253, when Mindaugas was crowned as King of Lithuania and transferred parts of Samogitia to the order. The Samogitians did not recognize the transfer and fought for their independence. For the knights, Samogitia was a strategically important region as it physically separated their Prussian and Livonian branches. After the Samogitians killed 12 knights in the Battle of Memel, near the newly built Memel Castle (Klaipėda) in 1257, a two-year truce was concluded. Once the truce expired, the Samogitians invaded Courland and defeated the knights in the Battle of Skuodas in 1259. The success encouraged the Semigallians to rebel. The knights attempted to strengthen their strategic position and attacked Tērvete (Terwerten) hoping to turn the Semigallian outpost into a Teutonic castle. When the attack failed, they built a fortress in nearby Dobele (Doblen) and Georgenburg (possibly present-day Jurbarkas) in Samogitia. The Semigallians attacked Dobele, but, due to poor siege tactics, suffered heavy casualties. The Samogitians did not attack Georgenburg directly but built a fortress nearby, cutting off the castle from its supplies and continuously harassing the garrison.