One of Britain's most famous paintings will stay in Scotland following a successful £4m fundraising campaign.

The Monarch of the Glen, Sir Edwin Landseer's 1851 depiction of a stag, was saved following a campaign by National Galleries Scotland (NGS).

There had been the prospect of the painting going under the hammer and potentially disappearing from public display Scotland.

It is owned by drinks giant Diageo, which signalled its intention to put it up for auction in November last year.

The firm said the famous painting, on loan to the National Museums Scotland since 1999, had "no direct link to our business or brands."

An agreement was reached with NGS to keep the painting in Scotland if £4m could be raised by March 17.

On Friday, NGS announced it had met the fundraising target in time for the deadline.

NGS director-general Sir John Leighton said: "We are thrilled that we have been able to secure this iconic work for the national collection.

"The enormous support from the public has been incredible with donations coming from all over the world and from the length and breadth of Scotland and the rest of the UK.

"Thank you so much to everyone who has donated. Your gift has helped to ensure that this magnificent work will be enjoyed by millions of people for generations to come."

David Cutter, Diageo's senior director in Scotland, said: "We are very happy to have partnered with the NGS and to see the positive outcome of that with the Monarch of the Glen passing into permanent public ownership in Scotland for the first time in its history."

There are now plans for the painting to go on tour around Scotland with funding from the National Lottery and Scottish Government.

Culture secretary Fiona Hyslop said: "I am delighted that NGS has secured the funding required to ensure the iconic Monarch Of The Glen can remain on permanent public display in Scotland.

"The overwhelmingly positive response to the public fundraising campaign underlines the importance of the painting to people in Scotland and around the world.

"I am pleased the Scottish Government was able to provide £100,000 towards its acquisition and a further £75,000 for a tour that will enable communities across Scotland to see it."

Featuring an iconic image of a stag in a misty Highlands landscape, the Monarch of the Glen was commissioned to hang in the Palace of Westminster in London.

Describing the painting, NGS says: "For many people around the world this image encapsulates the grandeur and majesty of Scotland's highlands and wildlife.

"It has also taken on a symbolic status in the popular imagination as a romantic emblem of Scotland and the natural wonders the country encapsulates."