Image caption Van Dyck's portrait depicts Olivia Boteler Porter, lady-in-waiting to Charles I's wife Henrietta Maria

A previously unknown painting by 17th Century master Van Dyck has been identified after being spotted online.

The portrait was previously thought to have been a copy and was in storage at the Bowes Museum in County Durham.

But it was photographed for a project to put all of the UK's oil paintings on the BBC Your Paintings website, where it was seen by an art historian.

After an investigation by BBC Two's Culture Show, it has been verified by Van Dyck expert Dr Christopher Brown.

Dr Brown, director of the Ashmolean Museum in Oxford, told The Culture Show that it was "a substantial discovery".

"It's quite clear that this is a late English period Van Dyck," he said. "I don't think there's any doubt about that. This absolutely is Van Dyck at his best."

Anthony van Dyck, one of the finest portrait painters of the 17th Century, was born in Antwerp and became court artist for King Charles I in London in 1632.

The portrait depicts Olivia Boteler Porter, lady-in-waiting to Charles I's wife Henrietta Maria.

The painting, which was not thought to be important and in a bad condition, was covered in layers of dirt and varnish and was not on display at the Bowes Museum.

Media playback is unsupported on your device Media caption Culture Show presenter Alistair Sooke and art historian Dr Bendor Grosvenor explain how it is possible to spot a master

But it was photographed as part of the Public Catalogue Foundation's mission to document every oil painting in public ownership and added to the BBC's Your Paintings website, where it was spotted by art historian and dealer Dr Bendor Grosvenor.

"Although as part of our national heritage values are irrelevant, for insurance purposes it should now be valued at anything up to £1m," Dr Grosvenor said.

"Had it appeared at auction as a copy, and in its dirty state, it would probably only have been estimated at about £3,000-5,000."

Your Paintings: A Culture Show Special will be broadcast on BBC Two at 18.30 GMT and can be seen on the BBC iPlayer for a week after transmission.