Christian IX was King of Denmark from 1863. He was a son of Duke Wilhelm of Schleswig-Holstein-Glücksburg and Princess Louise Caroline of Hesse-Kassel. As such he was descended from Christian III through the male line. In 1842, he was married to Princess Louise of Hesse-Kassel and together they had six children. It was not expected originally that Prince Christian was to become king of Denmark but as Frederik VII didn't have any children, it became necessary to find an heir to the throne elsewhere. Christian IX was chosen as heir to the throne as he was a great grandchild of Frederik V on both his father's and his mother's side.
Shortly after Christian IX became King of Denmark the Second Schleswig War broke out and led to a Danish defeat. This made the King very unpopular amongst the Danish people but over time their view of the King changed. Christian IX's long reign and his beloved family contributed to his increasing popularity. His children were married into several European princely families, which gave him the nick-name "the father-in-law of Europe".
Christian IX was trained as an officer in the Horse Guards. Thanks to his close ties with Frederik VI and Christian VIII, he travelled at times in Europe representing the two Danish kings when they themselves were unable to travel. On his travels he established good connections with the European Royal houses, which contributed to his ascending to the Danish throne.