In 1608, the reformed princes merged into a so-called Union within the Empire. In Franconia, the margraves of Ansbach and Bayreuth as well as the imperial cities were part of this alliance. The Catholic side responded in 1609 with a counter-alliance, the League. The conflicts between the two camps ultimately resulted in the Thirty Years' War, which was the greatest strain on the cohesion of the Franconian Circle Initially, Franconia was not a theatre of war, although marauding armies repeatedly crossed its territory. However, in 1631, Swedish troops under Gustavus Adolphus advanced into Franconia and established a large encampment in summer 1632 around Nuremberg. However, the Swedes lost the Battle of the Alte Veste against Wallenstein's troops and eventually withdrew. Franconia was one of the poorest regions in the Empire and lost its imperial political significance. During the course of the war, about half the local population lost their lives. To compensate for these losses about 150,000displaced Protestants settled in Protestant areas, including Austrian exiles.

Answer this question based on the article: Which event happened first, the Catholic counter-alliance, or the Union with the Empire?
the Union with the Empire