Britain's 95-year-old Queen Elizabeth spent a night in a hospital for the first time in years for what royal officials termed "preliminary investigations" but was in good spirits and back at work at her Windsor Castle home on Thursday.

The world's oldest and longest-reigning monarch canceled an official trip to Northern Ireland on Wednesday. The palace said the queen had been told to rest by her medical staff and that her ailment was not related to COVID-19.

"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 palace said in a statement on Thursday.