The Domenichino was sold at Christie's Old Masters sale on December 8 for £8.2m (plus 12% buyer's premium) to an American buyer (a sale overshadowed at the time by the mighty £26m bid for the Raphael drawing Head of a Muse), but an export licence was deferred by the Reviewing Committee on the basis of its history in this country.
St John was painted for the Giustiniani collection in Rome in the 1620s but had been owned for more than a century by the Christie family of Glyndebourne opera fame.
The National Gallery itself is still recovering from the titanic effort of buying the Duke of Sutherland's Diana and Actaeon by Titian with the National Gallery of Scotland, but an anonymous collector has stepped in to make the purchase.
Rules allow private offers if public access is available to artworks for 100 days within a 12-month period.
The buyer has now loaned it to the National Gallery for the next 18 months and agreed the picture will be put on public display for three months every year.
By Roland Arkell