A MASTERPIECE by one of the Glasgow Boys has been bought for the nation in an unprecedented joint purchase by Glasgow City Council and the National Galleries of Scotland.

In The Orchard, by Sir James Guthrie, was snapped up at auctioneers Sotheby's in London earlier this week for £637,500, with more than £400,000 provided by the National Heritage Memorial Fund (NHMF).

The painting, featuring two children in a rural idyll, was painted by Guthrie in 1885/6 and gained international fame soon after its unveiling.

It was described as "one of the most important works by Glasgow artists".

The large work was exhibited in Glasgow in 1887, then Edinburgh, before achieving inter-national fame at the Paris Salon in 1889 and at the Munich international exhibition of 1890.

The painting, purchased from a private collection, will now spend three years in Edinburgh at the national galleries (NGS) and three in Glasgow in an alternating exhibition plan.

The painting was first bought by a Mr Bishop of Helensburgh in 1887 from the Royal Glasgow Institute for £210 and then by Mrs McAlpine of Holmsdale, Surrey, by 1932 and had stayed in that family until its sale this week on behalf of the Ewing Foundation for the Benefit of Deaf Children.

Currently in London, the painting starred at the recent exhibition, Pioneering Painters: The Glasgow Boys, shown at Kelvingrove Museum and Art Gallery, Glasgow, and the Royal Academy, London, in 2010 and 2011.

In the deal, the NGS contributed £75,579.50, Glasgow paid £75,579.50, the NHMF gave £423,358 and the Art Fund gave £62,983.

John Leighton, director general of the NGS, said: "Guthrie's In the Orchard is a key masterpiece in the story of Scottish art and, at a time when funding is obviously very scarce, it is entirely fitting NGS and Glasgow City Council should join forces to acquire this iconic work for the public.

"We are immensely grateful to the National Heritage Memorial Fund and the Art Fund for their rapid and very generous support, which has allowed us to move quickly to secure this extremely important work at auction."

Dame Jenny Abramsky, chair of the NHMF, said: "This is wonderful news. Guthrie's In the Orchard is universally acknowledged as one of the most powerful paintings of the Glasgow Boys Movement, which directed the course of modern art in 19th-century Britain."

Councillor Archie Graham, depute leader of Glasgow City Council and chairman of Glasgow Life, which runs the city's museums and galleries, said: "We're thrilled to have been able to save this masterpiece for both Glasgow and Scotland. It will be an excellent addition to Glasgow's collections."