The unfinished portrait of Mary, which is thought to have been painted over in the wake of her 1587 execution, was discovered after a Scottish art historian recognised the face of the monarch on the X-ray.
The depiction of Mary, likely to have been created in Edinburgh, may be the work of the Netherlandish artist Adrian Vanson, a royal court painter to whom the portrait of Sir John, Lord Chancellor of Scotland at the time, is attributed.
One theory is that Sir John, who had survived a number of attempts on his life due to his closeness to the king, may have commissioned a portrait to celebrate his luck.
The discovery emerged during a project by the National Galleries of Scotland and the Courtauld Institute of Art to examine work by Vanson and Adam de Colone, two Netherlandish artists working in Edinburgh in the 16th century.
The painting is in the National Trust collection and is normally on display in Ham House in London.
Dr Caroline Rae discovered the concealed portrait using a technique which revealed the presence of lead white depicting a woman’s face and the outline of her dress and hat beneath the upper layers of paint.
She said: “I thought right away that it looked like Mary Queen of Scots. I didn’t want to get too carried away, but when I started to look at comparable contemporary portraits I thought it actually could be her. She has quite distinctive features and proportions.
“The really exciting thing is that it seems to have been an unfinished portrait over-painted two years after her execution. Once she died and was exposed as being part of a conspiracy to plot against the English Queen Elizabeth you wouldn’t really want to be associated with her. You could literally lose your head for having the wrong associations in those treacherous times.
“By 1589, when the portrait is inscribed, Maitland was Lord Chancellor of Scotland. His administrative reforms and closeness to the king in the 1580s had made him deeply unpopular with the Scottish nobility, and in fact he had just survived an attempt on his life by several Scottish nobles in the year this work was painted.
“He may even have commissioned this portrait to commemorate surviving. He was arguably the most important man in Scotland after King James, so it would’ve made perfect sense for him to have commissioned this portrait from the king’s painter.”
David Taylor, curator of pictures and sculptures at the National Trust, said: “Vanson’s portrait of Sir John Maitland is an important picture in our collection, and the remarkable discovery of the unfinished portrait of Mary Queen of Scots adds an exciting hidden dimension to it.”
Christopher Baker, director of the Scottish National Portrait Gallery, which is opening an exhibition featuring the discovery on Saturday, said: “The shadowy presence of the queen beneath a painting of Scotland’s Lord Chancellor could not have been detected without Dr Rae’s technical expertise.”