Ulrika Eleonora Stålhammar belonged to a family from Småland, Sweden, where almost everyone was a soldier or married to a soldier. Ulrika loved horses, hunting and weapons, but as a woman she was excluded from the family profession. In 1713, aged 25, Ulrika dressed as a man, took the name Wilhelm Edstedt and rode to Stockholm. After a few years of short-term employment, she became increasingly adept at playing Wilhelm. She then joined the artillery in Småland and remained there for ten years.