The House of Habsburg became extinct in the 18th century. The senior branch ended when Charles II of Spain died in 1700 and was replaced by the House of Bourbon. The mental and physical handicaps of Charles II were probably caused by inbreeding between relatives in the royal houses of continental Europe. Marriages of close relatives occurred for five generations before him. He was the son of Philip IV, who married his sister's daughter.