The developments on the military front did not however proceed as hoped for by the pro-Saxon majority. The common Russian-Saxon-Polish offensive had failed, as Charles forced the Russians to abandon Grodno and the Saxon-led coalition army was defeated in 1706 at the Battle of Fraustadt. As a result of the favorable for him outcomes at the War of the Spanish Succession, Charles XII was able to enter the Holy Roman Empire and occupied Saxony. Augustus II had to agree to humiliating terms of the Treaty of Altranstädt of 1706, in which he renounced the Polish crown.