The order was formed from the remnants of the Livonian Brothers of the Sword after their defeat by Samogitians in 1236 at the Battle of Schaulen (Saule). They were incorporated into the Teutonic Knights and became known as the Livonian Order in 1237. In the summer of that year, the Master of Prussia Hermann Balk rode into Riga to install his men as castle commanders and administrators of Livonia.