She was born into a wealthy Croatian merchant family in Zagreb, and moved to Vienna at the age of 13 to live with her maternal uncle. In November 1848, the revolution erupted in Vienna, and the seventeen-year-old dressed herself as a man and enlisted in the universities regiment. She served in battle during the October revolution in Vienna and after in Hungarian revolution. She was wounded in battle, distinguished herself and was promoted to the rank of an officer.