In the spring and summer of 1323, a Lithuanian army led by Gediminas came up the Neman and laid siege to the castle of Memel after conquering the town, and devastated Sambia, forcing the Order to sue for a truce in October. During the planning of a campaign against Samogitia, Memel's garrison of the Teutonic Order's Livonian branch was replaced with knights from the Prussian branch in 1328. Threats and attacks by Lithuanians greatly thwarted the town's development; the town and the castle were both sacked by Lithuanian tribes in 1379, while Samogitians attacked 800 workers rebuilding Memel in 1389.