One of JMW Turner's finest watercolours will remain in the UK after the Tate launched a campaign to keep the masterpiece in the country.
The Blue Rigi was sold at auction last June to an anonymous bidder for £5.8m - a record for a British watercolour.
The culture minister put a temporary bar on the painting leaving the country to give the Tate time to raise the £4.95m it needed to buy it back.
The total has now been reached after members of the public donated £550,000.
When the campaign was launched in January, members of the public were asked to contribute £300,000 by donating £5 to "buy a brushstroke" online.
Several leading artists, including David Hockney and Peter Blake, supported the appeal.
More than 11,000 donations were received from all over the world.
Turner painted the Rigi mountain, a scene from Lake Lucerne in Switzerland, in 1842 when he was 66.
The Tate had pledged £2m of its own funds towards securing the painting, and was also given £500,000 by The Art Fund charity.
As a result of the success of the public appeal, the National Heritage Memorial Fund (NHMF) will make up the rest of the cost up to a maximum of £1.95m.
"There is nothing like The Blue Rigi. It is a truly extraordinary work of ineffable beauty," said Tate director Sir Nicholas Serota.
David Barrie, director of The Art Fund, said the total raised was the largest amount by an appeal of its kind.
"There are many, many people out there... who contributed to this appeal, who care enough to put their money where their mouth is," he said.
"We're not talking about an elite, a few pointy-headed people that care about this - this is something that the public really care about."
The Blue Rigi is on display with the Dark Rigi and the Red Rigi at the Turner Three Rigis exhibition at Tate Britain.
The paintings are widely regarded as the artist's finest works.
People can still contribute to the campaign, allowing the NHMF to conserve funds for future appeals, until 5 March.