The Dobele castle is first mentioned in records in 1254 as a fortified timber castle, the administrative centre of the Semigallian Dobele district. Intense battles against German crusaders took place in the Dobele vicinity during the Livonian crusades. Semigallians fiercely resisted the enemy, who could not conquer the castle. Between 1279 and 1289, the Dobele castle withstood six sieges by the Livonian Order. In 1289, with the surrounding lands razed, Semigallians set fire to their own castle and departed undefeated to the lands of the Lithuanian Grand Duchy.