 However, the Thebans refused to meet the Spartan army in battle, instead building a trench and stockade outside Thebes, which they occupied, preventing the Spartans advancing on the city.The Spartans ravaged the countryside but eventually departed, leaving Thebes independent.This victory so heartened the Thebans that they undertook operations against other neighboring cities as well.