Petőfi joined the Hungarian Revolutionary Army and fought under the Polish Liberal General Józef Bem, in the "Transylvanian army". The army was initially successful against Habsburg troops, but after Tsar Nicholas I of Russia intervened to support the Habsburgs, it was defeated. Petőfi was last seen alive in the Battle of Segesvár on 31 July 1849.