A Victorian painting, which depicts a scene in rural Snowdonia in the mid 1860s, has been saved for the nation.
William Dyce's Welsh Landscape with Two Women Knitting, 1860 was initially at risk of going abroad.
But National Museum Wales has secured it for £557,218 with a mix of grants, donations and gifts.
The museum's keeper of art said they had hoped the "beautiful work" would one day "come home to Wales".
The purchase has been supported by the National Heritage Memorial Fund (NHMF) and the Art Fund, which both awarded a grant of £166,000.
There was also backing from one major private donor, a number of gifts and 150 individual donors.
An export ban was placed on the work by the UK government after it was sold at Sotheby's in November 2008.
The painting depicts two women in folk costume knitting in the landscape of Snowdonia.
Artist William Dyce who was originally from Scotland visited Wales for his health and a "change of air" in 1860, and was immediately captivated by the area.
This work, based on sketched material from his excursion, was probably painted in the studio when he returned to London. Dyce died in 1864.
The Dyce painting is the only known Welsh subject picture by an artist who absorbed many key pre-Raphaelite principles.
It depicts two figures, an elderly woman seated and a younger one standing, on a carefully observed landscape in Snowdonia.
The young woman is wearing Welsh national dress of red cloak, apron and tall black hat, and both are knitting.
The painting will now form a part of Wales' national art collection, and will initially be included in the museum's new Victorian Art display.
Oliver Fairclough, Keeper of Art at the museum, said: "We have hoped for many years that this very beautiful work by Dyce would one day come home to Wales.
"We are delighted that this has now been achieved and are deeply grateful to NHMF and the Art Fund for their support.
"Indeed, the exceptional number of individual donors who've backed this campaign demonstrates the interest and importance of this work."
Dan Clayton-Jones, chair of the Welsh committee and trust of the NHMF said they too were delighted that the painting which so vividly captures the essence of the Conwy Valley will be part of the Welsh art collection.
He said: "This grant continues NHMF's support for the museum, now over £3.2m, which has enabled them to secure a range of Welsh treasures including the Wynnstay Organ, William Hogarth's The Jones Family and the Jackson silver."
Stephen Deuchar, director of the independent charity the Art Fund, said they were very pleased to have given the £166,000 to help secure the painting.
"It's a perfect example of how private and public money can work in tandem to secure great works for public enjoyment."