Around 1700, the monarchs of Denmark–Norway, Saxony (ruled by elector August II of Poland, who was also the king of Poland-Lithuania) and Russia united in an alliance against Sweden, largely through the efforts of Johann Reinhold Patkul, a Livonian nobleman who turned traitor when the "great reduction" of Charles XI in 1680 stripped much of the nobility of lands and properties. In late 1699 Charles sent a minor detachment to reinforce his brother-in-law Duke Frederick IV of Holstein-Gottorp, who was attacked by Danish forces the following year. A Saxon army simultaneously invaded Swedish Livonia and in February 1700 surrounded Riga, the most populous city of the Swedish Empire. Russia also declared war (August 1700), but stopped short of an attack on Swedish Ingria until September 1700.