Queen Elizabeth II
Queen Elizabeth II is seen at the Chichester Theatre while visiting West Sussex on Nov. 30, 2017, in Chichester, United Kingdom. Getty Images/Stuart C. Wilson

Prince Harry and Meghan Markle recently welcomed their son, Archie Harrison, along with the rest of the royal family. However, despite being his parents, the Duke and Duchess of Sussex don't actually have full custody of their baby boy.

Royal expert Marlene Koenig recently dished on the topic of custody when it comes to royal babies. She claimed that a royal quirk means Queen Elizabeth II is the one with full legal custody of Markle and Prince Harry's firstborn and future children, according to The Sun.

Legislation that passed during the reign of George I reportedly entails that the Queen is responsible for the care and charge of minor royal family children. This doesn't just include baby Archie but also his cousins, Prince William and Kate Middleton's children Prince George, Princess Charlotte and Prince Louis.

“The sovereign has legal custody of the minor grandchildren. Legislation passed during the reign of George I," Koenig said of the agreement. “It was known as The Grand Opinion for the Prerogative Concerning the Royal Family and it was about the King’s control over the education, the raising and the marriage of his grandchildren."

The reason the legislation was necessary in the first place reportedly had something to do with the king's son. According to reports, the law was first created in 1717 when the monarch's right of supervision extended to his grandchildren.

“George I did not get along with his son, the future George II,” Koenig told The Independent. “I believe it came about when the Prince of Wales [George II] did not want to have the godparent for his son that his father wanted - so George I got Parliament to come up with something.”

Koenig claimed that the law gave the Queen power to allow or deny his great-grandchildren's trips abroad when they are minors. The royal expert dished that Prince Charles and Princess Diana asked the monarch if they could travel with Prince William and Prince Harry, who was just an infant at the time, to Scotland by plane. The Queen reportedly allowed it.

"Later, as Harry got older, he would fly with parents, and William would travel separately," she claimed.

If reports are accurate, Prince Charles would, in theory, inherit custody of his grandchildren when he ascends the throne eventually.

Publications reached out to Buckingham Palace for comment on the custody agreement, but reps declined.