Both are ardent fans of horse racing and share an understanding of what it's like to hold an important ceremonial role. So the Queen was particularly glad to be hosting a glittering banquet for the Aga Khan's Golden Jubilee, which he celebrated last year.
Her guest at Monday's dinner in Buckingham Palace is a direct descendant of the Prophet Muhammad and the leader of the world's 15 million Shia Ismaili Muslims. They've met up on several occasions since the Aga Khan succeeded his grandfather to the title in 1957.
To honour the milestone anniversary, the Queen wore an elegant gown adorned with golden sequins, as well as jewellery in gold and silver.
The golden theme was also picked up by the Aga Khan's sister Yasmina, the daughter of his father Prince Aly and Hollywood actress Rita Hayworth. She was resplendent in a shimmering metallic floor-length creation, accessorised with a matching clutch.
Completing the family group at the gala was the Muslim leader's son Prince Hussain, with his American-born wife Kristin, who took the name Princess Khaliya on their marriage two years ago.