The National Gallery has reached an agreement on the purchase of Raphael's The Madonna of the Pinks.
The painting is thought to have been completed in Florence in about 1507-8
The painting, which was owned by the Duke of Northumberland but has been on loan to the gallery since 1992, has been bought for £22m, after tax.
The money was raised jointly by the Heritage Lottery fund and contributions from members of the public.
The Duke originally wanted to sell the art work to the J Paul Getty Museum in California for a reported £29m.
The Heritage Lottery Fund awarded £11.5m to the National Gallery in July to help it bid to keep the painting, which measures just 11.4 inches by 9 inches.
Donations from both gallery visitors and private contributors, the American Friends of the National Gallery plus a £400,000 grant from the National Art Collections Fund made up the £10.5m needed to top up the Lottery Fund's share.
The painting will go on a tour of the UK, taking in the National Museums and Gallery of Wales in Cardiff, Manchester City Art Gallery, the McLellan Galleries in Glasgow and the Bowes Museum, County Durham, near its former home at the duke's Alnick Castle.
The Madonna of the Pinks will return to London in time for the National Gallery's major Raphael exhibition, which opens in October.
Last summer, Heritage Lottery Fund chair Liz Forgan praised the gallery's bid for the Madonna but criticised it for being so dependent on the fund.
The gallery had originally been seeking £20m from the fund but revised its request after seeking advice on tax laws.
The painting is considered to be one of the most cherished small images of the Madonna and the Christ Child from the Italian Renaissance.
It is thought to have been completed in Florence in about 1507-8, just before Raphael left to start work in Rome.
The Duke of Northumberland's home at Alnwick Castle plays host to thousands of visitors each year, and the duke has maintained that funds from the painting will help maintain UK heritage.
Asked about the loss to the Inland Revenue from the sale, the gallery's direction Charles Saumarez Smith said that this was "the way it becomes possible for national institutions to continue to acquire great works of art".
He added that the museum would be in "severe difficulties" if another
expensive painting went on sale in the immediate future.
"Nobody would disguise the fact that acquiring great works of art at the
moment is particularly problematic for the National Gallery.
"We are expected to acquire great works of art at the top end of the market,
but there is a danger that the top end of the market is unaffordable."
The sale to the National Gallery ends a dispute that began in 2002 when the duke decided to sell the painting to the J Paul Getty Museum in California for a reported £29m in order to safeguard rural jobs through his business venture, Northumberland Estates.
The duke criticised the National Gallery for trying to "pressurise" him into selling them the Raphael masterpiece at a discount.
A temporary export bar was then put on the painting in January 2003 by the UK Government to "provide a last chance" to raise cash to keep it in the country.
The duke's spokesman, Philip Gregory, said at the time: "We would like it to remain in Britain if at all possible."