In the Hungarian Revolution of 1848, a Polish general, Józef Bem, became a national hero of both Hungary and Poland. He was entrusted with the defence of Transylvania at the end of 1848, and in 1849, as General of the Székely troops. On October 20, 1848 Józef Wysocki signed an agreement with the Hungarian government to form a Polish infantry battalion of about 1,200 soldiers. After agreement Wysocki organized in Hungary "Polish legion" of volunteers contained 2,090 foot soldiers and 400 Polish uhlans. They took part in the siege of the Arad fortress in the spring of 1849 and participated in all important battles at Szolnok, Hatvan, Tápió-Bicske and Isaszeg. After the Battle of Temesvár in August 1849, and the Hungarian capitulation at Világos, eight hundred of the remnants of the Legion escaped to Turkey.