Erik was the son of King Knut Eriksson of Sweden, but his mother is now unknown. In 1205 he escaped from the Battle of Älgarås, where his three brothers were killed. He stayed for three years with family in Norway. He returned to Sweden in 1208 and defeated Sverker II of Sweden in the battle of Lena. He was married in 1210 to Rikissa of Denmark, the daughter of Valdemar I of Denmark and Sophia of Novgorod.