A video, which was posted to Twitter and has amassed around 250,000 views, shows the pair sharing a stool, as Dame Judi appeared to play Abba’s hit Waterloo on the piano.
Ms Spiteri - lead singer of rock band Texas - belts out the song, while Dame Judi also chimes in.
GLOBAL EXCLUSIVE - Dame Judi Dench gigs with Sharleen Spiteri at The Fife Arms, Braemar - future dates are in the planning. Watch this space, meantime, HAPPY NEW YEAR! #damejudidench #judidench #sharleenspiteri #thefifearms #braemar #scotland 🏴 #newyear #happynewyear pic.twitter.com/5iOcl3SuB3
— Ewan Venters (@ewanventers) January 1, 2023
When the rendition is over, Ms Spiteri can be heard exclaiming “What a pianist!”
The performance took place at The Fife Arms in Braemar, Aberdeenshire, on Saturday just before midnight fireworks welcomed in 2023.
Whether or not the actress actually played the piano was open to speculation, as many Twitter users were quick to point out the instrument appeared to be playing automatically.
One tweeter wrote: “Did no one else notice that this was a self-playing piano? The keys are moving by themselves and Dame Judy is acting wonderfully well! (Sorry to spoil the party atmos)”.
Another said: “Look at the keys, she’s not actually playing.”
But despite this, Ewan Venters, chief executive officer of Artfarm, which owns The Fife Arms, told BBC Scotland the rendition brought happiness to those present.
“Judi Dench and Sharleen Spiteri were staying at the hotel and we had an impromptu moment at the piano,” he said.
“It was a happy evening with lots of guests and locals clapping.”
Other Twitter users described the clip as “delightful”, with one calling Dame Judi and Ms Spiteri “two absolute legends”.