quality:correction, structural:reformatting
Danish intervention (1625–1629)

With Saxony dominating the Upper Saxon Circle and Brandenburg the Lower, both kreise had remained neutral during the campaigns in Bohemia and the Palatinate. However, Frederick's deposition in 1623 meant John George of Saxony and the Calvinist George William, Elector of Brandenburg became concerned Ferdinand intended to reclaim formerly Catholic bishoprics currently held by Protestants. These fears seemed confirmed when Tilly restored the Roman Catholic Diocese of Halberstadt in early 1625.

As Duke of Holstein, Christian IV was also a member of the Lower Saxon circle, while the Danish economy relied on the Baltic trade and tolls from traffic through the Øresund. In 1621, Hamburg accepted Danish "supervision", while his son Frederick became joint-administrator of Lübeck, Bremen, and Verden; possession ensured Danish control of the Elbe and Weser rivers.

Ferdinand had paid Albrecht von Wallenstein for his support against Frederick with estates confiscated from the Bohemian rebels, and now contracted with him to conquer the north on a similar basis. In May 1625, the Lower Saxony kreis elected Christian their military commander, although not without resistance; Saxony and Brandenburg viewed Denmark and Sweden as competitors, and wanted to avoid either becoming involved in the empire. Attempts to negotiate a peaceful solution failed as the conflict in Germany became part of the wider struggle between France and their Habsburg rivals in Spain and Austria.

In the June 1624 Treaty of Compiègne, France had agreed to subsidise the Dutch war against Spain for a minimum of three years, while in the December 1625 Treaty of The Hague, the Dutch and English agreed to finance Danish intervention in the Empire. Hoping to create a wider coalition against Ferdinand, the Dutch invited France, Sweden, Savoy, and the Republic of Venice to join, but it was overtaken by events. In early 1626, Cardinal Richelieu, main architect of the alliance, faced a new Huguenot rebellion at home and in the March Treaty of Monzón, France withdrew from Northern Italy, re-opening the Spanish Road.

Dutch and English subsidies enabled Christian to devise an ambitious three part campaign plan; while he led the main force down the Weser, Mansfeld would attack Wallenstein in Magdeburg, supported by forces led by Christian of Brunswick and Maurice of Hesse-Kassel. The advance quickly fell apart; Mansfeld was defeated at Dessau Bridge in April, and when Maurice refused to support him, Christian of Brunswick fell back on Wolfenbüttel, where he died of disease shortly after. The Danes were comprehensively beaten at Lutter in August, and Mansfeld's army dissolved following his death in November.

Many of Christian's German allies, such as Hesse-Kassel and Saxony, had little interest in replacing Imperial domination with Danish, while few of the subsidies agreed to by the Treaty of The Hague were ever paid. Charles I of England allowed Christian to recruit up to 9,000 Scottish mercenaries, but they took time to arrive, and while able to slow Wallenstein's advance were insufficient to stop him. By the end of 1627, Wallenstein occupied Mecklenburg, Pomerania, and Jutland, and began making plans to construct a fleet capable of challenging Danish control of the Baltic. He was supported by Spain, for whom it provided an opportunity to open another front against the Dutch.

On 13 May 1628, his deputy von Arnim besieged Stralsund, the only port with facilities large enough to build this fleet. However, this threat led Gustavus Adolphus to send several thousand Scots and Swedish troops to Stralsund, commanded by Alexander Leslie who was also appointed governor. Von Arnim was forced to lift the siege on 4 August, but three weeks later, Christian suffered another defeat at Wolgast. He began negotiations with Wallenstein, who despite his recent victories was concerned by the prospect of Swedish intervention, and thus anxious to make peace.

With Austrian resources stretched by the outbreak of the War of the Mantuan Succession, Wallenstein persuaded Ferdinand to agree with relatively lenient terms in the June 1629 Treaty of Lübeck. Christian retained his German possessions of Schleswig and Holstein, in return for relinquishing Bremen and Verden, and abandoning support for the German Protestants. While Denmark kept Schleswig and Holstein until 1864, this effectively ended its reign as the predominant Nordic state.

Once again, the methods used to obtain victory explain why the war failed to end. Ferdinand paid Wallenstein by letting him confiscate estates, extort ransoms from towns, and allowing his men to plunder the lands they passed through, regardless of whether they belonged to allies or opponents. In early 1628, Ferdinand deposed the hereditary Duke of Mecklenburg, and appointed Wallenstein in his place, an act which united all German princes in opposition, regardless of religion. This unity was undermined by Maximilian of Bavaria's desire to retain the Palatinate; as a result, the Catholic League argued only for a return to the position prevailing pre-1627, while Protestants wanted that of 1618.

Made overconfident by success, in March 1629 Ferdinand passed an Edict of Restitution, which required all lands taken from the Catholic church after 1555 to be returned. While technically legal, politically it was extremely unwise, since doing so would alter nearly every single state boundary in North and Central Germany, deny the existence of Calvinism and restore Catholicism in areas where it had not been a significant presence for nearly a century. Well aware none of the princes involved would agree, Ferdinand used the device of an Imperial edict, once again asserting his right to alter laws without consultation. This new assault on "German liberties" ensured continuing opposition and undermined his previous success.

At the same time, his Spanish allies were reluctant to antagonise German Protestants as their war in the Spanish Netherlands had now shifted in favour of the Dutch Republic. The financial predicament of the Spanish Crown steadily deteriorated in the 1620s, particularly after the Dutch West India Company captured their treasure fleet at Matanzas in 1628. The War of the Mantuan Succession further diverted Spanish resources from the Netherlands, while the loss of 's-Hertogenbosch to the Dutch Army under Frederick Henry in 1629 caused dismay in Madrid.