A painting of the Madonna that has long been displayed in a Scottish stately home has been revealed as being by Raphael.

Experts have re-attributed a painting of the Virgin Mary, which hangs as part of the art collection of Haddo House in Aberdeenshire, to the Renaissance master.

The painting had previously been thought to be by a relatively obscure artist Innocenzo da Imola but is now believed to be by Raphael, who lived from 1483-1520 and regarded, alongside Michelangelo and Leonardo da Vinci, as one of the geniuses of the Renaissance period.

The work is part of the Haddo House and collection which has owned by the National Trust for Scotland (NTS) for more than 30 years.

The painting could be worth more than £20m, with a sketch by the same painter sold for nearly £30m at auction in 2012.

As the painting is in public hands, it is unlikely to be sold at auction and has been given no official valuation.

The re-attribution came from the house appearing in BBC4’s Britain’s Lost Masterpieces which airs on Wednesday this week.

Art experts Dr Bendor Grosvenor and Jacky Klein spotted two paintings of interest in the dining room on the Art UK website before they visited Haddo House earlier this year – a previously unknown landscape attributed to French artist Claude Lorrain and the portrait of the Madonna.

The paintings were acquired in the 19th century by George Hamilton-Gordon, the 4th Earl of Aberdeen and Prime Minister between 1852 and 1855.

The Madonna in the house by the 1890s, but was believed to be merely inspired by, or 'after', Raphael.

As part of the TV programme, two artworks were removed and professionally cleaned and conserved by Edinburgh-based conservator Owen Davison.

Claude is regarded as a very important landscape painter whose work has inspired many landscape painters, including Turner and Constable.

The painting, A Pastoral River Landscape with Fishermen, is thought to be an early work.

The Virgin Mary was purchased by the 4th Earl who believed it to be a genuine Raphael, but it was later attributed to Innocenzo da Imola.

Jennifer Melville, head of collections, archives and libraries at the National Trust for Scotland said: "The National Trust for Scotland holds so many treasures all over the country.

"We always knew that the collection at Haddo was very special, and the discovery of these wonderful pieces confirms its importance in the Scottish art world.

"It is rare for visitors to see works of this quality outwith a gallery, so it is a real treat to come to Haddo House and enjoy them in this wonderful setting.

"This is particularly exciting for the piece which looks likely to be by Raphael. There are not many places where you can experience the work of one of the Renaissance’s giants in a dining room."

Dr Bendor Grosvenor said: "Finding a possible Raphael is about as exciting as it gets. This is a beautiful picture that deserves to be seen by as many people as possible. I hope ‘the Haddo Madonna’, which would be Scotland’s only publicly owned Raphael, brings many people to this part of Aberdeenshire."

Haddo House is a stately home near Tarves in Aberdeenshire and has been owned by the NTS since 1979.

It was designed by the Scottish architect William Adam in 1732.

The house is open for guided tours but the ground are open all the time.

The land on which the house stands has been home to the Gordon family since the 15th century.

When the 4th Marquess of Aberdeen and Temair, David Gordon, died in 1974, he left the house and its garden to the NTS.

Lady Aberdeen lived in the south wing of the house until her death in 2009.

Haddo House has a fine art collection with hundreds of pictures, by artists including family portraits by Guizot, Paul Delaroche and Batoni.