Brandenburg was completely ravaged during the 30 Years War, but came out of it with a big army and their claims on Prussia and Pomerania honoured. How did this happen?

by Wakiem_

From what I know Brandenburg is an unfertile stretch of land with no natural barriers. During the war their land was plundered by Swedes, Imperials and other Germans. But then the Great Elector comes along and suddenly they have 20.000 fighting men and are a prized ally, which results in their claims being honoured and even having Poland give away sovereignty over East-Prussia.
What caused this turn-around?

Corporal_Klinger

After inheriting the throne in 1640, the Frederick William had only a few thousand mercenaries and refugees from other armies at his disposal because of the stingy grants from the Estates. The mercenaries under his payroll terrorized the land they were supposed to defend and were, surprise, incompetent as a fighting force. Frederick rid the army of incompetent foreign mercenaries and Colonels who terrorized citizens for personal gain, this process taking roughly a year; Frederick won the gratitude of the Estates for rectifying the military anarchy. However, Frederick was left with only 2,500 men. Taking advantage of the Estates' gratitude, the Elector built up his army to 8,000 men by 1648.

After the war, the Estates, wary of the Elector's power, demanded army reductions over the course of 30 years as they have done in the past. Wanting to continue his policy of military expansionism, Frederick, through political schemes and conceits, eventually built an army large enough to defy his opponents. The most important was a compromise in 1653 with the Brandenburg Estates. Junkers (land-owning nobility) were granted a large array of privileges: the Junker's fiefs were now exclusively owned by themselves, they were recognized as the only class allowed to acquire estates, and privileges shakily extorted from previous Electors, such as dominion over their peasants' lives and exemption of taxation, were officially confirmed. These privileges were exchanged for a grant of 530,000 talers, payable over 6 years. This grant allowed Frederick William to maintain a force of ~5,000 men, a small foundation to quickly build on. Frederick would eventually be able to coerce the Estates into his will; the fact that no general meetings of the Estates were held after 1653 demonstrates the Estates' waning power.

In 1655, Sweden invaded Poland (The 2nd Northern War). Frederick reasoned the war could serve as a threat (which Brandenburg joined in 1657), and began recruiting forces in Brandenburg and the principalities on the lower Rhine and beckoned the East Prussian militia. The Estates objected to contributing funds to anything besides defending their own provinces. However, already equipped with a decent size army, Frederick swept the protests aside and imposed steep new taxes to pay for new recruits.

8,000 men under arms by September, 1655.

22,000 by June, 1656.

27,000 when the Treaty of Olivia (1660) ended hostilities.

After this war, there were reductions to the army, but never as drastic as before. Between 1660 and 1672, Frederick kept a standing army between 7,000 and 12,000 men - no longer did Brandenburg have to build its army from scratch at the outbreak of war. Frederick died in 1688 with an army of ~30,000.

Source:

Craig, Gordon A. The Politics of the Prussian Army: 1640-1945. New York: Oxford U, 1964. Print.

Edits: Some edits were made to make for easier reading.