Britain's Prince Harry, Duke of Sussex and his wife Meghan, Duchess of Sussex wave as they head back towards Windsor Castle after their wedding ceremony on May 19. Aaron Chown - Pool via Getty Images

Prince Harry and Meghan received the titles of His and Her Royal Highness upon marriage in May 2018.

Harry's full title was His Royal Highness The Duke of Sussex, Earl of Dumbarton and Baron Kilkeel while Meghan became known as Her Royal Highness The Duchess of Sussex. She was the first person to hold that title.

The only previous person to hold the title of Duke of Sussex was an anti-slavery campaigner and supporter of rights for Catholics and Jews, according to the Royal Collection. Prince Augustus Frederick, son of George III and Queen Charlotte, gained the title in 1801.

The titles are granted under the British monarchy's system of "peerage," which traces back to feudal times. Originally, the monarch would bestow titles on servants who pledged loyalty in exchange for protection or land, making them a peer of the realm. Today, it is used for relatives of the monarch.

Titles are decided by the Queen when a relative either comes of age or gets married.

The Queen can choose from five titles for a man -- duke, marquess, earl, viscount or baron -- and for a woman -- duchess, marchioness, countess, viscountess and baroness. Dukedom is the highest of all five.

Typically, family members are given the titles of Duke and Duchess, but the Queen can choose to bestow more than one title.

In the case of Prince Harry's brother, Prince William, he and his wife, Kate Middleton, became the Duke and Duchess of Cambridge, but the Queen also granted Prince William the titles of Earl of Strathearn and Baron Carrickfergus.

Prince Charles -- Harry and William's father -- is the Duke of Cornwall, and the Queen's second son, Prince Andrew, was given the title Duke of York.

But breaking with tradition was the Queen's youngest son, Prince Edward, who chose the title Earl of Wessex when he married.