Experts identified the triptych, depicting five miracles of Christ, as the only surviving work of an unknown painter who was active in Brussels.

It has been described as “exceptionally rare”, having survived through religious purges and political upheaval for more than 500 years in the almshouse chapel.

Museum executive director Claire Dixon said: “We have no objects or artworks in our collection related to the Reformation.

“This would be the earliest artwork in our collection, in terms of paintings.”

The museum has previously used export deferrals for artefacts worth hundreds of thousands of pounds, but never millions.

She said: “The scale is enormous, I don’t know if we are going to be able to do it but I just think, what are we here for if we don’t try?

“I don’t think it has ever left Dorset – its significance to the county is really important.”