King Charles II of Spain, the last in the Habsburg line, had one of the most distinct Habsburg jaws of the family.

Many of the kings and queens of the Spanish Habsburg dynasty, which ruled across Europe from the 16th to the start of the 18th century, had a distinctive facial deformity: an elongated jaw that later became known as the "Habsburg jaw." Now, a new study suggests this facial feature was likely the result of centuries of inbreeding.

"The Habsburg dynasty was one of the most influential in Europe," lead author Roman Vilas, a professor of genetics at the University of Santiago de Compostela, said in a statement. But the dynasty "became renowned for inbreeding, which was its eventual downfall."

That is because the royal bloodline of the dynasty's Spanish branch ended in 1700 with the death of King Charles II, who couldn't produce an heir, likely as a result of inbreeding, according to a previous Live Science report . But it was unclear if their tendency to inbreed was also written on their faces.

Related: Family Ties: 8 Truly Dysfunctional Royal Families

To figure out whether the distinctive jaw was a result of inbreeding, Vilas and his team found 10 maxillofacial surgeons and asked them to analyze 66 portraits of 15 members of the Habsburg dynasty.

The surgeons searched for 11 features that defined "mandibular prognathism," or protrusion of the jawbone. They also looked for seven features that define "maxillary deficiency," a related condition in which the maxillary bones — or the bones that form the upper jaw — don't fully develop. The authors hypothesized— and later confirmed — that both of these conditions were related, had the same genetic basis and made up the Habsburg jaw, according to the statement.

The surgeons were asked to score the degree of both facial deformities for each member of the Habsburg dynasty. They found that Mary of Burgundy, who married into the family in 1477 and was Duchess of Burgundy, had the least mandibular prognathism, whereas Philip IV, who ruled Spain and Portugal from 1621 to 1640, had the most.

The five members of the royal dynasty who has the greatest maxillary deficiency were Maximilian I, who began his rule as Holy Roman Emperor in 1493; Maximilian's daughter; his nephew; his nephew's great-grandson; and Charles II, who was the last of the Habsburg Line.

The authors then calculated the amount of inbreeding that occurred throughout the centuries, using information from a large family tree that included 6,000 people spanning 20 generations. They then correlated the inbreeding with the degree of facial deformity seen in the paintings and found that there was a strong link between the degree of inbreeding and the degree of mandibular prognathism.

In other words, the people who were the most inbred, had the most pronounced case of this facial deformity. They also found that more inbreeding was linked to a higher degree of maxillary deficiency, but only in two of the seven features that were diagnosed.

Inbreeding likely led to the Habsburg jaw because of what's called genetic homozygosity — or the inheritance of the same form of a gene from both parents, the authors suggest. Genetic homozygosity occurs more often when relatives mate, because they share a greater proportion of genes. That being said, the study is small and so it is not possible to say that the Habsburg jaw is definitely caused by inbreeding, according to the researchers.

The findings were published today (Dec. 2) in the journal Annals of Human Biology .

Originally published on Live Science .