When King Gustav II Adolf decided to join the war in Germany (1630), he appointed Gustav Horn as his second in command. At the battle of Breitenfeld in 1631, Horn prevented the Imperial force under Tilly from flanking the main body of the Swedish army, after their Saxon allies had fled the field. After this Horn led troops in Upper (southern) Franconia and conquered among others, Mergentheim, the town of the Teutonic Order and the bishopric of Bamberg). He then went to Bavaria with the king. Horn was sent to lead troops in the Rhineland, where he occupied Koblenz and Trier, and continued to Swabia.