Queen Elizabeth II spent a night in hospital after being advised to rest and cancel a visit to Northern Ireland this week, Buckingham Palace said on Thursday.
"Following medical advice to rest for a few days, The Queen attended hospital on Wednesday afternoon for some preliminary investigations, returning to Windsor Castle at lunchtime today (Thursday), and remains in good spirits," a statement said.
Britain's domestic Press Association news agency said the trip to hospital was unannounced as it was expected to be a short stay, and also to protect the 95-year-old monarch's privacy.
But the overnight stay was for "practical reasons", it added, without disclosing the hospital concerned or the nature of the tests.
The Queen, who is Britain's longest-serving monarch, having been on the throne since 1952, was said to be back at her desk on Thursday afternoon, undertaking light duties.
She had been due to attend an ecumenical service in the border town of Armagh on Thursday to mark the 100th centenary of the creation of Northern Ireland.
But the palace said on Wednesday morning she had "reluctantly accepted medical advice to rest for the next few days".
The decision was not related to the coronavirus and she was said to have been resting at her Windsor Castle residence, west of London.
The Queen has had a busy schedule since returning from her remote Balmoral estate in northeast Scotland at the start of October.
On Tuesday, she had appeared cheerful as she hosted a reception at Windsor for international business leaders attending a government investment summit.
She had also held two audiences with overseas ambassadors via videolink.
The Queen is expected to join other senior royals, including her eldest son and heir, Prince Charles, 72, for a series of events linked to the upcoming UN climate summit in Glasgow next month.
Last week, she was seen for the time at a major public event using a walking stick, but royal officials said it was not linked to any specific health condition.
© Agence France-Presse