|Died||21 June 1359 (aged 19–20)|
|Spouse||Beatrix of Bavaria|
|Father||Magnus IV of Sweden|
|Mother||Blanche of Namur|
Referring to Erik Magnusson as King Eric XII is a later invention, counting backwards from Eric XIV (1560-68). He and his brother Charles IX (1604-1611) adopted numerals according to a fictitious history of Sweden. The number of Swedish monarchs named Eric before Eric XIV (at least seven) is unknown, going back into prehistory, and none of them used numerals. It would be speculative to try to affix a mathematically accurate one to this king.
Erik was the son of King Magnus Eriksson (1316-1374) and the grandson of Eric, Duke of Södermanland (c. 1282-1318). In 1343 Eric and his brother, Haakon, were elected heirs to the thrones of Sweden and Norway, respectively. He was married to Beatrix of Bavaria (1344-1359) ,daughter of Louis IV, Holy Roman Emperor.
Håkon received the Norwegian throne in 1355 and this led to the prior union between those countries being dissolved. In 1357 a Swedish rebellion forced King Magnus to share the rule of Sweden with his son Erik, who was allowed domain over most of Scania and Finland. Joint rule of Sweden was established again in 1359 when father and son became reconciled and co-ruled Sweden until Eric's death a few months later. Quite soon after his death his wife, Beatrix, died as well. It is generally believed that they both died of the Black Death.