Princess Wanda (reputedly lived in 8th century Poland) was the daughter of Krakus, legendary founder of Kraków. Upon her father's death, she became queen of the Poles, but committed suicide to avoid an unwanted marriage.
The first written record of the legend of Wanda was by the Polish chronicler Wincenty Kadłubek. In this version of the story Wanda ruled Poland after the legendary Polish king Krakus. When her lands were invaded by an "Alamann tyrant", who sought to take advantage of the previous ruler's death, Wanda led her troops out to meet him. Seeing her beauty, the German troops refused to fight and their leader committed suicide. Towards the end of the story Kadłubek states that "the river Vandalus is named after" her and hence the people she ruled over were known as "Vandals". In this version Wanda remained unmarried and had a long life.
Subsequent versions of the story differ significantly. In the version from the Wielkopolska Chronicle, the German leader, Rytygier, first wanted to marry Wanda and invaded her lands only when she refused. Here, he died during the ensuing battle, while it was Wanda who afterward committed suicide, as a thanks and a sacrifice to the pagan gods who gave her victory. In yet other versions of the story, Wanda commits suicide, by throwing herself into the Vistula river, because she knows that as long as she is alive, there will be future potential suitors who will use her refusal to marry as a pretext for an invasion.
The story of princess Wanda was first described by medieval (12th and 13th centuries) Polish bishop and historian, Wincenty Kadłubek, and it is assumed by most historians that it was invented by him, possibly based on Slavic myths and legends, although some historians see the legend rooted in Scandinavian or Ancient Roman (or Greek) traditions.
Interestingly, the Kadłubek version has the German prince, not princess Wanda, committing suicide: according to Kadłubek, the princess lived a long and happy life, forever remaining a virgin. It was only in the 13–14th century Wielkopolska Chronicle that the variant with Wanda committing suicide was popularized by the 15th-century historian, Jan Długosz.