The artwork was tucked inside a 1980 copy of Hockney’s Paper Pools, donated a year ago to the Salvation Army shop on Lower Goat Lane, Norwich.

The print, which depicts a swimming pool and was signed by Hockney, was discovered by Salvation Army volunteer and artist Jemma Banks.

Jemma Banks said: “It was a privilege to hold a genuine signed David Hockney print in my hands, and I was amazed that it had remained safely inside the book for 46 years, looking as fresh as the day it came off the lithographic press.

“As a local artist, I recognised that the book might be something special, but I never imagined just how significant it would turn out to be.

“I’m delighted that something hidden away for so long will now help raise money for people in our community who need it most.”

The book and print were listed on the Salvation Army’s eBay site and fetched £41,160 from an anonymous bidder.

The charity described the print as an “exceptionally rare collector’s piece.”

Maj Tracey Bale, who leads The Salvation Army’s Norwich Citadel, said: “Thanks to [Jemma] recognising that this was far more than an ordinary donated book, an incredible piece of art has been preserved and transformed into vital funds for our work.”

The anonymous buyer said the opportunity was incredibly special.

The buyer said: “I’ve admired David Hockney’s work for many years, so acquiring such an iconic piece is incredibly special.

“I’m delighted that, at the same time, the purchase will help support the invaluable work of The Salvation Army.

“It’s wonderful to know that something with such cultural significance can also make a meaningful difference to people’s lives.”

One of the most celebrated and influential British artists of modern times, Hockney died peacefully at home on June 11, his publicist Erica Bolton said.

During his lifetime, Hockney was lauded for his use of different formats, embracing digital art and the use of iPads as much as traditional painting.

He trained at the Bradford School of Art in the 1950s, followed by the Royal College of Art in London, where he graduated with gold medal distinction in 1962 and subsequently emerged as one of the seminal talents in the new generation of British artists.