Edict of Restitution

The Edict of Restitution, which passed eleven years into the Thirty Years' War on March 6, 1629, in the city of Vienna, following Catholic successes at arms, was a belated attempt by Ferdinand II, Holy Roman Emperor to restore the religious and territorial situations reached in the Peace of Augsburg (1555), whose "Ecclesiastical Reservation" had impeded the secularization of Catholic church lands after 1555, as no further Catholic church lands could legally be transferred to Protestant control. However, for several decades weak emperors had been unable to enforce the "Ecclesiastical Reservation" against Protestant encroachments.
Background.
This lack of decisive or effective authority along with the Protestant view of the legal interpretation as well as the value of the land and the characteristic dislike for all things Catholic led several princes to secularize the Catholic church lands under the treaty established and customary practice of "cuius regio, eius religio". This usually occurred when a Catholic head of the church converted to Protestantism.
The Peace of Augsburg, signed in 1555, had confirmed the result of the Diet of Speyer (1526) which had, by agreeing to disagree, ended with this principle as a prime result. With that principle confirmed by the Treaty at Augsburg, the violence of that earlier day between the Lutherans and the Catholics in Germany ended—at least for the generation, until renewed tensions brought about the Thirty Years' War.
Behind all this were the inheritance practices in Europe as a whole and in particular the German states within the Holy Roman Empire. Land and control over it was a source of both power and wealth, and the noble families sought to control as much land within the extended family as was possible, for example by appointing younger sons prince-bishops or prince-abbots.
The Edict.
The "Edict of Restitution" was an attempt to ensure that the "Ecclesiastical Reservation" of the Augsburg treaty was retroactively enforced. It had a tremendously polarizing effect causing the approximately 1,800 states of the Holy Roman Empire to shatter into disparate blocks of opposed interests.
If fully effected, it would have affected the already secularized archbishoprics of Bremen and Magdeburg, 12 bishoprics and over 100 religious houses around the German states. The Edict resulted in a great transfer of power and property away from the Protestants to the Catholics, and in effect broadened a divisive religious struggle into that plus a dynastic struggle for power, as seen from the viewpoint of many smaller German princes, who might otherwise have stayed neutral.
Other states were greatly affected when the mercenary armies marched through neutral states or ravaged them in the course of their foraging expeditions. Thousands of Protestants fled to Protestant controlled states, generally broadening the war, and central Germany was ravaged repeatedly, by some estimates losing between 25% and 50% of its pre-war population because the competing armies continually took the food—the majority of civilian deaths being caused by the twin side-effects of famine, and deaths from endemic diseases under populations weakened by famine.
The greatest impact was in northeast Germany. It was here that Ferdinand's power was at its weakest. Ferdinand appointed Imperial administrators to take over the secularized states and cities, re-establishing Imperial authority in an area that had been free of Imperial rule for nearly 100 years. Ferdinand's actions were not well received by the princes. It was a move that alarmed the French and led to the French intervention in the war.
The German princes could do nothing. They had seen the Coalition destroyed. Wallenstein had a massive army of 134,000 troops in the field to enforce Imperial authority.
Wallenstein disliked the Edict as it trespassed into the region he considered his own but he played his part for the emperor to the full. He stated that "he would teach the Electors manners. They must be dependent on the emperor, not the emperor on them." The response of the princes was to rally behind Maximillian of Bavaria to pressure Ferdinand into dismissing Wallenstein.
Their chance came in 1630 when Ferdinand called a meeting of the Electors in Regensburg because he wanted his son, Ferdinand III, elected King of the Romans. According to the law, the emperor of the Holy Roman Empire was selected by a vote from the Electorate of German princes. Therefore, Ferdinand needed their cooperation to approve his son as successor. Ferdinand also hoped to persuade the Electors to approve greater Imperial involvement in the European wars.
John George I of Saxony and George William of Brandenburg (both Protestant) stayed away to protest the Edict of Restitution. The Electors who were present realized that they had little to gain from additional involvement in the wars. However, Maximillian still asked Ferdinand for the dismissal of Wallenstein.
To win over the Electors, Ferdinand sacked Wallenstein in August 1630 though Wallenstein argued that he was allowed to resign to save face. The dismissal of the most powerful military figure in Europe was a major victory for the Electors and Regensburg must be seen as a defeat for Ferdinand.
All of this was overshadowed in July 1630—Gustavus Adolphus landed in Pomerania with 4,000 men in response to the persecution of the Protestants. Without Wallenstein, Ferdinand had to turn to Maximillian and Tilly to stop the new threat.
In 1635 the Edict of Restitution was effectively revoked, with the terms of the Peace of Prague. 
Twenty two theologians led by Cardinal Dietrichstein : the majority Dominicans and capuchins led by Don Diego Quiroga voted in favour of repeal. A minority of Jesuits led by Fr Lamormaini voted against. "It would not be displeasing to God" for the Edict to be decided in the best interest of peace (ie it was left to temporal powers to decide).