The king of Bahrain, whose regime has been accused of rights abuses, was among nearly 50 foreign royals at a lunch on Friday to mark the diamond jubilee of Britain's Queen Elizabeth II.
King Mswati III of Swaziland, Africa's last absolute monarch, was also on the guest list for an event that has caused several diplomatic headaches for Britain.
Bahrain is gripped by civil unrest following a brutal crackdown on pro-democracy protests, while Swazi activists accuse King Mswati of presiding over an economic meltdown while enjoying an ultra-lavish lifestyle.
Spain's Queen Sophia pulled out of the lunch earlier this week due to tensions with Britain over the disputed territory of Gibraltar.
About 50 people staged a protest against what they called "dictator monarchs" outside Buckingham Palace in London, where most of the foreign royals were attending a dinner following the lunch at Windsor Castle.
King Hamad was not at the dinner hosted by heir to the throne Prince Charles and his wife, though King Mswati and one of his 13 wives were among the guests who sat down for cheese souffle, sea bass and rhubarb Eton mess at the palace.
"We feel it's tremendously important to show that there are British people who do not agree with these royal dictators being invited to Windsor Castle and Buckingham Palace," said human rights campaigner Peter Tatchell.
"The queen has misjudged the public mood. Most British people would not agree with our head of state wining and dining dictators who stand accused of very serious human rights abuse."
Demonstrators chanted and held banners reading: "Shame on you Liz Windsor," and "Democracy now for Swaziland".
At the black-tie dinner inside, Charles and his wife Camilla greeted guests including King Abdullah II of Jordan and his wife Queen Rania, and Prince Albert II of Monaco with his wife Princess Charlene.
Royals from Brunei, Kuwait, Qatar and Saudi Arabia were also among the guests for the two events.
Signup to our newsletter and follow us on Facebook and Twitter!
Less controversially, Japan's 78-year-old Emperor Akihito, King Harald V of Norway and Queen Beatrix of the Netherlands were among the 17 foreign reigning monarchs who attended.
An AFP reporter at Windsor said security was low-key and there was no sign of any protest. Indeed, a dozen-strong group waved Bahraini flags.
Around 150 people gathered to see the limousines arrive at the castle west of London. Some monarchs waved to the crowds as they went in, while Japanese spectators cheered and bowed to their emperor.
One spectator, Clare, a Windsor woman in her 60s, used binoculars to identify the flags on the vehicles.
"This is not a political event," she told AFP. "It's a great pity that politics had been allowed to intrude. The diamond jubilee is a celebration for the queen."
Queen Elizabeth, 86, and her husband Prince Philip warmly greeted their guests as they arrived and assembled for a group photo.
Buckingham Palace has said that the Foreign Office approved the invitation to King Hamad.
Britain has close links to Bahrain and has had to tread carefully in diplomatic terms since the unrest broke out.
Prime Minister David Cameron held a meeting with King Hamad at his Downing Street residence in December when he urged him to implement reforms, and offered Britain's support in doing so.
Bahrain's Crown Prince Salman bin Hamad al-Khalifa turned down an invitation to William and Kate's wedding following a public outcry in Britain.
Amnesty International says around 60 people have been killed in Bahrain since the anti-regime protests first erupted in February last year.
The visit by international royals is one of the main events in the run-up to four days of celebrations spanning June 2-5 to mark the queen's 60th year on the throne.