Queen Elizabeth II spent a night in hospital for tests after being forced to 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 had been kept under wraps because it was expected to be a short stay, and also to protect the 95-year-old monarch's privacy.
The overnight stay was for "practical reasons", it added.
The palace made the announcement after The Sun newspaper broke the news.
The tabloid said it was decided she should stay at the private King Edward VII's Hospital in central London because it was too late to make the 26-mile (42-kilometre) trip back to Windsor.
She has previously been treated at the exclusive clinic, which is known for treating the royal family, including in 2013 for gastroenteritis, when she also stayed for one night.
In 2003, surgeons at the hospital removed minor non-cancerous growths from her face and operated on her knee, while in 1982 had a wisdom tooth extracted.
The Queen's late husband, Prince Philip, spent four weeks from February this year for treatment for a pre-existing heart condition. He died in April, just a few weeks before his 100th birthday.
The head of state, who has been on the throne since 1952 and is Britain's longest-serving monarch, 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 Windsor.
- Busy schedule -
The Queen, who still rides and drives on her private estates, has had a busy schedule since returning from her remote Balmoral estate in northeast Scotland at the start of October.
But news that she had an overnight stay in hospital will inevitably raise fears for her health, given her advanced age, and questions about whether she should slow down further.
Next year she is due to celebrate her Platinum Jubilee to mark 70 years on the throne.
Last week, she delivered a speech at the opening of the Welsh Assembly in Cardiff, and at the weekend spent a day at Ascot racecourse.
On Monday, she held a virtual audience with the new governor-general of New Zealand, and on Tuesday received two ambassadors, also by videolink.
On Tuesday evening, she hosted a reception at Windsor for international business leaders attending a government investment summit, including the billionaire philanthropist Bill Gates, and senior British ministers.
At that reception, the Queen appeared cheerful as she, her eldest son and heir Prince Charles, 72, and grandson Prince William, 39, mingled with guests, none of whom were wearing facemasks.
Coronavirus restrictions were lifted in Britain in July but an increase in cases has prompted calls for measures to be reimposed to prevent further close-contact transmission.
Daily virus cases crossed the 50,000 mark on Thursday, according to the latest government figures -- the highest since July 17.
The Queen and Prince Philip moved to Windsor in March last year as the coronavirus outbreak took hold.
The decision was made to self-isolate because of the increased risk of infection due to their age, although she has since been vaccinated.
The Queen is still expected to join other senior royals 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.