Queen Camilla's attempt to break royal protocol was halted by her sister-in-law Princess Anne during a rare joint engagement at the University of London's Foundation Day. 

On Wednesday, Anne, 74, who is the chancellor of the University of London, presented Camilla, 77, with an honorary doctorate of literature to recognize the queen's promotion of literacy and literature for over two decades. 

Shortly after arriving together at the university's Senate House, where the ceremony was conducted, Camilla invited the Princess Royal to enter the room before her. 

However, Anne, who is familiar with royal protocol, "smiled and politely refused — allowing Camilla to enter first," according to the Daily Express.

HOW QUEEN CAMILLA WENT FROM VILIFIED MISTRESS TO BELOVED DAUGHTER-IN-LAW

princess anne/queen camilla

Princess Anne halted Queen Camilla's attempt to break royal protocol during a recent joint engagement. (Getty)

During formal and state occasions, the royals adhere to an order of precedence, which is a "sequential hierarchy of nominal importance," according to the outlet. 

Though Anne, the only daughter of the late Queen Elizabeth II and Prince Philip, was born into the royal family, Camilla, as queen, ranks above her in the order of precedence. 

Camilla would be expected to enter the room before Anne, in keeping with royal tradition. 

queen camilla and princess anne smiling

Camilla was presented with an honorary doctorate of literature from the University of London by Princess Anne, the university's chancellor. (Arthur Edwards/WPA Pool/Getty Images)

After walking into the room, Camilla and Anne joined the other four recipients of honorary doctorates and their families, per the Daily Express. While in the room, Camilla was photographed smiling as she signed a visitor's book.

Before the ceremony, Anne inspected a Guard of Honour consisting of members of the university’s Officer Training Corps, Air Squadron and Royal Naval Unit, according to the outlet.

KING CHARLES ‘KNEW’ QUEEN CAMILLA ‘WAS GOING TO BE CROWNED ALONGSIDE HIM,’ EXPERT CLAIMS: ‘THEY MEAN BUSINESS’

Camilla and Anne later donned ceremonial robes for the presentation of the doctorates. During the ceremony, Camilla was pictured kneeling on a stool while Anne smiled as she draped a hood over her sister-in-law's shoulders. 

The two later posed for photos together, and Camilla smiled as she held her diploma. 

camilla and anne walking down a hall

Camilla and Anne are pictured walking down a hall ahead of the ceremony. (Arthur Edwards/WPA Pool/Getty Images)

The University of London Foundation Day marks the academic institution's establishment by Royal Charter in 1836. In 1908, the university began conferring honorary degrees as part of the ceremony.

Along with Camilla, other royals to receive honorary degrees were King George V and Queen Mary, then the Prince and Princess of Wales, according to a press release from Buckingham Palace.

Other notable recipients include Sir Winston Churchill, Dame Judi Dench and T.S. Eliot.

"As an avid reader, The Queen has a strong interest in highlighting the importance of literacy and has long been a supporter of literacy in the UK and across the Commonwealth," the palace stated. "Her Majesty has visited schools and libraries, as well as workplaces and prisons, to see the work of adult literacy schemes.

Camilla signing a guest book

Camilla signed a guest book while attending the event. (Arthur Edwards/WPA Pool/Getty Images)

"As Duchess of Cornwall, Her Majesty became (and remains) Patron of several organisations which promote and support literacy, including the National Literacy Trust, First Story, Coram Beanstalk and BookTrust. 

LIKE WHAT YOU’RE READING? CLICK HERE FOR MORE ENTERTAINMENT NEWS

"The Queen’s Reading Room launched as an online book club on Instagram in January 2021 with reading recommendations from Her Majesty Queen Camilla, then Duchess of Cornwall, before becoming a charity which promotes the benefits of reading in February 2023."

The occasion also marked a special moment for Camilla and Anne, who share a close friendship. Anne's brother, King Charles III, and Camilla married in 2005 after a decades-long romance.

anne presenting doctorate to camilla

Anne smiled as she draped a hood over Camilla's shoulders during the ceremony. (Arthur Edwards/WPA Pool/Getty Images)

Charles and Camilla met in 1970 and began dating, though they broke off their relationship when the future monarch joined the Royal Navy in 1971. 

CLICK HERE TO SIGN UP FOR THE ENTERTAINMENT NEWSLETTER

Camilla went on to marry Anne's ex-boyfriend, Andrew Parker Bowles, in 1973, and Charles married Princess Diana in 1981. However, Charles and Camilla later resumed their romance while they were still married to their respective spouses. 

Parker Bowles and Camilla divorced in 1995, and Charles and Diana finalized their split in 1996, a year before the Princess of Wales died in a tragic car accident.

anne lifting hood over camillas head

Camilla and Anne have known each other for many years and share a close friendship. (Arthur Edwards/WPA Pool/Getty Images)

Charles and Camilla went public with their relationship in 1999. In the 2023 BBC documentary "Charles III: The Coronation," Anne spoke highly of her sister-in-law.

CLICK HERE TO GET THE FOX NEWS APP

"I've known her a long time, off and on," Anne said via the Daily Express. "Her understanding of her role and how much difference it makes to the king has been absolutely outstanding.

"This role is not something that she would have been a natural for, but she does it really well. And she provides that change of speed and tone."