The Queen should have set an example by wearing a face mask during her first public engagement outside of a royal residence since lockdown, the pressure group Republic has said.

The 94-year-old monarch visited the Defence Science and Technology Laboratory (DSTL) at Porton Down near Salisbury with the Duke of Cambridge on Thursday.

Neither wore face coverings, but the dstl said it tested all 48 people who were due to come into close contact with the royal visitors for Covid-19, and all came back negative.

Social distancing – including between William and his grandmother – was also maintained during the visit.

Graham Smith, chief executive of Republic, which campaigns for an elected head of state, said: “The Queen should be setting an example.

“I can’t see how this fits with the rules everyone else is expected to follow, so the Palace needs to come up with a rules-compliant explanation.”

Royal commentator Joe Little, managing editor of Majesty magazine, said the Queen and William would inevitably be criticised, but medical advice would have been carefully followed.

Royal visitThe Queen and grandson William during the visit to Porton Down (Ben Stansall/PA)

“The Queen and the Duke of Cambridge will inevitably be criticised for not wearing a face covering, but medical advice was sought while the royal visit was being planned and social distancing seemingly was maintained throughout,” Mr Little said.

He described the Queen’s engagement as offering a “visible and timely reassurance” during the global pandemic.

“The Queen’s first official engagement away from a royal residence for the first time in seven months delivers a visible and timely reassurance that daily life can continue during the pandemic in a modified form, even for someone in their 95th year,” he said.

“As expected, Her Majesty appeared in good form and no doubt she was pleased to be on duty once again after a prolonged absence.”

The QueenThe Queen watching a demonstration of a forensic explosives investigation (Ben Stansall/PA)

A Buckingham Palace spokeswoman said: “Specific advice has been sought from the medical household and relevant parties, and all necessary precautions taken, working closely with dstl.”

Face coverings are required by law in certain indoor settings such as on public transport, in shops and places of worship.

The Government recommends wearing a face covering in indoor places where social distancing may be difficult and where the public come into contact with those they do not normally meet.

It is not known when the dstl staff were tested, and Kensington Palace declined to comment on whether the duke was also required to have a test in order to be able to accompany his grandmother.