During the Thirty Years' War, the Valtellina was a theater of intense military and diplomatic struggle among France, the Habsburg powers and the local authorities. Control over the routes through the Valtellina to the passes between Lombardy and the Danube watershed was at stake. The anti-Habsburg forces in the Three Leagues put together a court that between 1618 and 1620 handed down a number of convictions (often "in absentia") against Catholics in the Leagues and Valtellina. The harsh judgments of the anti-Habsburg Thusis court led to a conspiracy to drive the Protestants out of the valley. The leader of the conspiracy, Giacomo Robustelli of the Planta family, had ties to Madrid, Rome and Paris. On the evening of 18/19 July 1620, a force of Valtellina rebels supported by Austrian and Italian troops marched into Tirano and began killing Protestants. When they finished in Tirano, they marched to Teglio, Sondrio and further down the valley killing every Protestant that they found. Between 500 and 600 people were killed on that night and in the following four days. The attack drove nearly all the Protestants out of the valley, prevented further Protestant incursions and took the Valtellina out of the Three Leagues. The killings in Valtellina were part of the conflicts in Graubünden known as the "Bündner Wirren" or Confusion of the Leagues.