The Queen poses for a formal picture with her guests before a sovereign monarchs jubilee lunch at Windsor Castle. Photograph: John Stillwell/AFP/Getty Images

It was meant to be a monarchical milestone, an unprecedented meeting of the world's crowned heads gathered at Windsor Castle in celebration of theQueen's diamond jubilee.

But as the kings, queens, princes, one emperor, a grand duke and an emir posed for a historic photograph inside the castle's Waterloo Chamber, elsewhere human rights activists condemned it as a platform for "blood-stained despots and tyrants".

Perhaps, the Queen's advisers may have reflected, this glittering anniversary bash was not such a good idea after all.

Taking his seat amid the heraldic splendour of St George's Hall, was King Hamad al-Khalifa of Bahrain, whose regime is accused of the brutal suppression of pro-democracy demonstrations.

Swaziland's controversial King Mswati III, who has amassed 13 wives and an estimated £60m personal fortune, according to Forbes magazine – while many of his 1.2 million subjects live in poverty – was seated nearby.

Saudi and Kuwaiti royals, criticised for their human rights records, also feasted from a menu which included English asparagus, Windsor lamb, wild mushrooms and Kent strawberries, paid for by the taxpayer, via the Sovereign's Grant.

The Queen had rolled out the full red-carpet treatment with the Duke and Duchess of Cambridge, Prince Harry and princesses Beatrice and Eugenie among a 12-strong royal welcoming party. Prince Charles was not there, as he was hosting his own glittering dinner at Buckingham Palace on Friday night for the foreign rulers, excluding King Hamad, who was not attending.

The Queen welcomed the Bahraini ruler with a handshake and a laugh as the two shared a joke.

But detractors condemned the event as a "catastrophic error of judgment". It was, pronounced the chief executive of the pressure group Republic, Graham Smith, a "crisis of her [the Queen's] own making". "Thanks to the Queen's misjudgment, her jubilee will forever be associated with some of the most repressive regimes in the world," he added.

Denis MacShane, a former foreign office minister, said: "Given the amount of blood on the hands of the royal regime in Bahrain it's a shame he will stain the white linen of Windsor Castle at this event."

MacShane laid responsibility at the door of the Foreign Office. It has said invitations were sent by the royal household. Some 21 sovereign monarchs, and six representatives, made up the largest such gathering of foreign royals since Queen Victoria's golden jubilee celebrations, captured in a painting by Laurits Tuxen. Not all, though, still had thrones – the royals of Bulgaria, the former Yugoslavia and Romania, for example, and the Hellenes. In the formal photograph, King Hamad was a diplomatic distance away from the Queen, though that was because the seating appeared to be arranged on length of regal service.

Showing no indication of being aware of the controversy surrounding his attendance, the Bahraini ruler convulsed into a fit of giggles as the photographer began taking the picture. Also laughing was the Sultan of Brunei, sitting in front. "Are you supposed to be enjoying this?" joked the Queen.

In some respects the lunch was something of a family affair featuring Europe's three queens: Elizabeth II, 86, Margrethe II of Denmark, 72, and Beatrix, of the Netherlands.

Many guests were the Queen's "kissing cousins", which happily dispensed with protocol over who should pay obeisance to whom. Queen Beatrix flung open her arms as she approached the Queen, before kissing her.

Bowing and curtsying was limited. Lest anyone be doubt as to who had precedence, however, it was Her Majesty - with Great Britain and 15 other realms notched on her belt. This being lunchtime, it was lounge dress and no proper bling.

The ghost of Victoria loomed large. Not for nothing was she known as the "grandmother of Europe", with her descendants present including the Queen, Prince Philip, Margrethe, King Harald of Norway, 75, and King Carl Gustaf of Sweden, 66.

Another would have been Spain's Queen Sofia, but she was prevented from attending by her government, furious over a planned visit by the Earl of Wessex to Gibraltar, the UK overseas territory Spain wants back.

Protesters stayed away from Windsor, except one, who called himself Joe. Others were planning to demonstrate outside Buckingham Palace on Friday evening, an event, as it turned out, the Bahraini ruler was not due to attend.

The Swazi Vigil protest group had waved placards outside the Savoy hotel, where Mswati was said to be installed with a 30-strong entourage, rather than Windsor. They did not, said protest co-ordinator Thobile Gwebu, want to "spoil" the Queen's jubilee celebrations. But, she added, they had written to Her Majesty politely asking if she could perhaps "have a word" with the Sherborne-educated absolute monarch.

Joe, meanwhile, waved his placard as the crowned heads arrived in cars at the Long Walk at Windsor Castle. "I booed at the King of Bahrain's car," Joe said proudly. "But right behind it was the Emperor of Japan's car. I was still booing and the Empress had the window down and was waving. She looked a bit startled and stopped waving straight away," he said.