Soon, Charles Albert, the King of Sardinia (who ruled Piedmont and Savoy), urged by the Venetians and Milanese to aid their cause, decided this was the moment to unify Italy and declared war on Austria (First Italian Independence War). After initial successes at Goito and Peschiera, he was decisively defeated by Radetzky at the Battle of Custoza on 24 July. An armistice was agreed to, and Radetzky regained control of all of Lombardy-Venetia save Venice itself, where the Republic of San Marco was proclaimed under Daniele Manin.