On February 13, 1660 the five-year old Karl
became king after his father's early death at the age of 37. His father, Carl X Gustav
, had only been king for six years, after the abdication of his cousin queen Kristina.
During the minority of Karl XI his mother, queen Hedvig Eleonora of Holstein-Gottorp
, served as regent.
During his reign Sweden was involved in a war with Denmark over Scania between 1675 - 1679, which ended with a status quo, without either party making any major gains or losses of territory. Karl XI had been engaged to the Danish princess Ulrika Eleonora of Denmark
before the war, and although she had been encouraged during the war to break off the engagement she had refused to do that and the couple was married in 1680, and the marriage was said to be a happy one until her death in 1693, although the couple had quite different interests. Karl XI is said to have been faithful to his wife during their marriage and on his deathbed he said to his mother that he hadn't been happy since her death.
After the war Karl XI devoted his life to keep Sweden out of war and the last 20 years of his reign was the longest peacetime in Sweden between 1611 - 1718. During that time he arranged for a financial restoration to strengthen the nation's finances, as well as a military restructure and also establishing Sweden as an absolute monarchy.
King Karl XI died in 1697 at the age of 41, and left a country with better finances and a better organized military to his 14-year-old son Karl XII.