The Queen spent Wednesday night in hospital for “preliminary investigations”, Buckingham Palace has confirmed.

The 95-year-old monarch, who was ordered to rest by doctors and advised to miss a trip to Northern Ireland, returned to Windsor Castle at lunchtime on Thursday and remains in “good spirits”.

A Buckingham Palace spokesman said: “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, and remains in good spirits.”

The head of state’s trip to central London’s private King Edward VII’s Hospital, which began on Wednesday afternoon, was kept a secret but the Palace issued a statement on Thursday evening after The Sun newspaper broke the news.

It was the monarch’s first overnight hospital stay in eight years.

She spent a night at the private clinic in 2013 when she was treated for a nasty bout of gastroenteritis.

She travelled to the hospital on Wednesday by car rather than by helicopter.

Qipco British Champions Day – Ascot
The Queen has had a busy October including a day at Ascot (Steven Paston/PA)

It is understood the head of state was due to attend for only a short stay while she was seen by specialists, so the development was not announced by the Palace at the time, and protecting the Queen’s medical privacy was also a consideration.

The overnight stay was said to be for “practical reasons”, a source said.

King Edward VII’s Hospital is 23 miles from Windsor – around a 55-minute drive in good traffic conditions.

The Queen’s team of royal physicians are understood to have been taking a “cautious approach”.

Duke of Edinburgh hip operation
King Edward VII’s Hospital in London where the Queen stayed overnight (Dominic Lipinski/PA)

The Queen was said to be back at her desk on Thursday afternoon, undertaking light duties.

She was said to be disappointed not to be able to travel to Northern Ireland on Wednesday, and reluctantly heeded the advice of her doctors.

The nation’s longest reigning monarch, whose husband the Duke of Edinburgh died just six months ago, has had a busy schedule since returning from Balmoral at the start of October.

She hosted a major Global Investment summit at Windsor Castle on Tuesday evening, where she looked bright and cheerful as she carried out her royal duties.

Global Investment Summit
The Queen meeting guests at the Global Investment Summit on Tuesday (Arthur Edwards/The Sun/PA)

Her admission is understood not to have been related to coronavirus.

Prime Minister Boris Johnson is continuing to resist calls from health leaders for tighter Covid restrictions despite the rising levels of infections

The daily number of cases reported in the UK has surpassed 50,000 for the first time since mid-July.

Buckingham Palace has not commented on whether the Queen has received her booster Covid-19 jab but given her age it is likely she has had it.