The iconic Monarch of the Glen painting could go on permanent public display in Scotland after its owners agreed a deal with National Galleries of Scotland.
Drinks giant Diageo had planned to put the painting up for auction, where it was expected to fetch about £8m.
The company has now gifted half the value of the piece to NGS in the hope it can raise the remaining £4m to put it in public hands for the first time.
Sir Edwin Landseer painted The Monarch of the Glen in 1851.
It has been on display in Edinburgh for 17 years while on loan to the National Museum of Scotland.
Art experts had feared it could be sold to a foreign owner at auction.
Sir John Leighton, director general of the National Galleries of Scotland, welcomed Diageo's partnership approach.
'Admired by millions'
He said: "We are delighted with this grand gesture by Diageo which offers a once-in-a-lifetime opportunity for this major work to be acquired for the nation.
"The Monarch of the Glen is an iconic image which is famous across the world.
"The ideal home for such an important and resonant picture is the Scottish National Gallery where it can be enjoyed and admired by millions of visitors in the context of the nation's unrivalled collection of Scottish, British and European art.
"We look forward to working with Diageo and our partners to ensure we achieve our ambition."
David Cutter, Diageo's senior director in Scotland, said: "We are delighted to partner with the National Galleries of Scotland, to create the opportunity for The Monarch of the Glen to remain on public display in Scotland on a permanent basis.
"We look forward to working with the National Galleries of Scotland."
The agreement was also welcomed by both the Scottish and UK governments.
Fiona Hyslop, the Scottish government's cabinet secretary for culture, said: "Recent reaction to news of its auction underlined the importance of this painting and I'm pleased the National Galleries and Diageo have agreed a plan to ensure its long association with Scotland can continue."
Secretary of State for Scotland, David Mundell, said: "The Monarch of the Glen is a unique piece of Scotland's rich cultural heritage and this is very welcome news in the National Galleries' ongoing effort to keep this iconic painting on public display in Scotland for the future.
"The UK is home to some of the world's great artworks, and it is important that they remain in our fantastic museums and galleries."