Johann Philipp Count of Scharffenstein, Freiherr of Riesenberg was born in 1585. At the outbreak of the Thirty Years' War, Scharffenstein served in the army of the Bishopric of Worms, which was part of the armed forces of the Catholic League. On 8 November 1620, he commanded a regiment of heavy cavalry at the Battle of White Mountain. Positioned on the flank of the Catholic infantry tercios he managed to contain the cavalry charge of Christian I, Prince of Anhalt-Bernburg. In the meantime elements of the Bohemian infantry fled the battlefield without even engaging the enemy, leading to a Catholic-Holy Roman victory. Scharffenstein's actions during the battle inspired several folksongs. Between 1621 and 1623, he fought under Johann Tserclaes, Count of Tilly against the remnants of the rebels forces headed by Ernst von Mansfeld, Christian the Younger of Brunswick and Georg Friedrich, Margrave of Baden-Durlach in the Palatinate campaign. After the conclusion of the campaign he joined the ranks of the Holy Roman army, departing for the Netherlands where he participated in Spinola's Siege of Breda (1624). Following the Danish intervention into the war he returned to Germany, commanding the Imperial cavalry in the Battle of Dessau Bridge (25 April 1626). On the same year, he quit Imperial service over an argument with Imperial generalissimo Albrecht von Wallenstein, possibly over the dismissal of Raimbaut XIII of Collalto. Deeply offended he entered the service of France. Not wanting to strain his relationship with the Holy Roman emperor Ferdinand II by whose grace he received estates in Bohemia, Scharffenstein left the French army shortly before the two states fought in the War of the Mantuan Succession. After Wallenstein's dismissal, Scharffenstein returned into the Imperial army, serving in lower Germany. 1630 was marked by the Swedish intervention in the Thirty Years' War, the Swedes swept through Pomerania and Brandenburg meeting little resistance. Scharffenstein was then appointed to the position of the garrison commander of the Landsberg an der Warthe, repealing a Swedish assault on the city in January 1631. Scharffenstein remained in Landsberg until the Sack of Magdeburg, whereupon he departed for Thuringia in the rank of Generalwachtmeister and commanding an independent army. There he faced off Bernard of Saxe-Weimar, while Tilly advanced to Saxony and fought the Battle of Breitenfeld. Swedish penetration into southern Germany led to the recall of Wallenstein into active service. Scharffenstein switched back into the Liga army, becoming the governor of the Upper Palatinate on 1 January 1632 and being promoted to General of the Artillery. In his new capacity he coordinated the efforts of the Imperial and Liga armies. On 9 March, he defeated the Swedes in the
Battle of Bamberg, the first such victory in the war.