The situation in the field continued to turn badly for Ferdinand as 1645 wore on. Their Danish detour concluded, the Swedes decided Bohemia and Ferdinand’s other personal lands looked appetizing. Once upon a time Sweden’s arrival would have been hailed as the liberation, but that would have been fifteen years ago. Bohemia in 1645 was almost entirely Catholicized, and what remained of that glorious opposition despised the Swedes for the all too typical rape and pillage that followed their army’s progress. Just south of Prague, an Imperial and Bavarian army hastily cobbled from everywhere turned to confront the Swedes on March 5th, 1645.
The Battle of Jankau was one of the bloodiest in the war. Swedish artillery quickly gained the high ground and won a decisive advantage. Even as the vaunted Bavarian cavalry ransacked the Swedish camp and threatened to make off with Torstenson’s wife the Swedes held their nerve and broke the spine of the Imperial army. Fully two thirds of a 16,000 strong Imperial army, including both of its commanders, were killed or captured. Powering forwards, the Swedes linked up with their Transylvanian allies and for a moment it looked like Vienna itself would fall under siege.
In the end, typical Transylvanian waffling and a stubborn fortress kept the Swedes from a total checkmate, but the situation was still dire. Ferdinand would later term the whole year “both terrible and miraculous”, as near total collapse was cheated time and again.
The French objective for the year had been to force Bavaria into a separate peace, as Maximilian was now in his early 70’s, and his son was only nine. Obsessed and fearful for his legacy, there was a strong chance the wily old Bavarian would see the writing on the wall and decide to settle his affairs before he died. Yet at Herbsthausen on May 2nd, 1645, the French Bernadines under Turenne were surprised by Mercy’s Bavarians and overwhelmed. It was enough to force the French to divert all their resources for a larger effort.
By August the French tried again at the Battle of Allerheim (or Second Nördlingen) both sides were merciless in the pursuit of victory. Joking aside the battle was a horrible bloodbath. Only technically a French victory, the real loss was Mercy himself, who had been shot in the thick of the fighting. Though Maximilian and the imperial forces rallied to halt a serious ravaging of Bavarian territory for a second time, the situation looked grim. Maximilian decided now was the time to head for the exit with all of the ill-gotten gains he could get his hands on, and began to negotiate his own separate truce. With Ferdinand on the brink of losing his closest ally, the Emperor was now finally desperate enough to talk seriously about peace.
Diplomatically 1646 finally marked the year where France and Sweden made their initial offerings, and the imperial Ambassador Maximilian von Trautmannsdorf responded. Perhaps the only kingdom with anything to gloat about was the French at this point. To their right the Swedes had asked for an exorbitant indemnity, and to their left stood the Dutch, who were trying to decide among themselves just what exactly their successful peace would even look like. In between the two the French had plenty of leverage, further bolstered by their ability to thumbscrew the Bavarians at any time in the field. The result would eventually turn into the concession of both Alsace and Lorraine, which before had orbited in German and French influence respectively, but were not definitively a part of France by any stretch of the imagination. Still, it was a mark of progress. What was less settled was the question of whether this peace would be with both branches of the Hapsburgs, or just the Austrians and Ferdinand III. As time and expenses mounted, the French maneuvered everyone towards the latter, trapping Spain in a longer term war to the finish.
Over the course of 1646 and 47, the Swedes, Dutch, and French were both somewhat worn down by the previous years of fighting, and it was starting to cause a strain on their relationships. The French were frustrated with the Swedes for their Danish detour, in addition to facing down a mutiny from the still employed Bernadines under Turenne. The Dutch were also annoyed at the French for doing better militarily in Flanders. Just recently the French took the time to conquer Dunkirk, the major hub port Spain’s raiders had been using to attack Dutch shipping. The result wasn’t so much great with jubilation by the Dutch as concern for just what the world would be like with a French neighbor. The “United” provinces were also unsure just what to do about the not entirely Spanish Netherlands these days. Cities like Antwerp were commercial centers in their own right, and true capitalists that they were many Dutch merchants didn’t want these cities to prosper as rival parts of the Netherlands.
Still, the mood was better than it was in Ferdinand’s house, who had to watch one of his last allies in Bavaria sign the Treaty of Ulm in 1647. The triumph of finally kicking the Bavarian chair out from Ferdinand was admittedly short lived though, as Maximilian wandered back into the imperial camp in 1648. The reasoning had to deal with the personal entreaties of Ferdinand III, and the old weasel’s realization that without a final push he was likely to lose the Palatinate title he had been fighting for thirty years to get. The decision was one he paid for dearly, and in 1648 the imperial and Bavarian forces were definitively ended at the battle of Zusmarschausen on May 17th. Under Turenne and Wrangel a combined Franco-Swedish army broke apart a final Imperial force, crippling Ferdinand’s negotiating hand. Also crippled: Bavaria, which was once again on fire from end to end. In bits and pieces, the war was coming to an end. Sealing the fate of the Imperial cause Ferdinand’s brother Leopold, now acting governor of the Spanish Netherlands, managed to wreck a final Flemish army at the Battle of Lens.
Yet in a final act that brought the war full circle, the Swedish army swung over and besieged Prague on July 25, 1648. On November 1st, 1648, fully a week after the signing of the Treaties of Münster and Osnabrück had ended the war and against bitter resistance the Swedes stormed Prague Castle. The city’s aristocrats were then killed or ransomed, without even the dignity of a show trial that Ferdinand II had given Prague so long ago. Among the looted goods was the famed treasury Emperor Rudolf II had spent his life assembling. Massive manuscripts like the 12th Century Devil’s Bible were carted off to Stockholm, where they remain to this day as a trophy of war. Hearing that peace had been declared, Swedish Prince Carl Gustaf ordered his men to withdraw. Prague’s inhabitants were left with half a city in their possession, and half of it in ruins. Much could be said for the rest of the Holy Roman Empire, adjusting now to life in the desert known as Peace.
 Wilson 2009
 much like the author in pursuit of a pun.
 The “singularly ugly” Trautmannsdorf gets high marks for wending his way through the negotiations of Westphalia in a way that preserved the Hapsburg stranglehold on the imperial crown. A close confidant of Ferdinand, his late arrival in 1645 is part of the reason Westphalia dragged on far longer than it needed to.
 A sticking point for Westphalia. The Dutch would ultimately kneecap Antwerp economically to clear the path for trade out of Amsterdam.