A portrait of Charles Dickens which had been missing for 174 years has been given a permanent home in the place where he penned some of his most famous novels.

The miniature shows Dickens aged 31, when he was writing A Christmas Carol.

Covered in mould, it was only identified after being sold in 2017 in a box of trinkets in South Africa.

The Charles Dickens Museum
The Charles Dickens Museum in London (Charles Dickens Museum/PA)

The Charles Dickens Museum, at the London residence where Dickens wrote Oliver Twist and Nicholas Nickleby, had been raising the £180,000 needed to acquire the 1843 painting.

It says it “received magnificently generous donations from admirers of Dickens from all over the world” for the work, painted by Margaret Gillies over six sittings.

Museum director Cindy Sughrue said the donations were “a magnificent affirmation of the enduring appeal of Dickens”.

The portrait when it was covered in mould
The portrait when it was covered in mould (Charles Dickens Museum/PA)

She added: “This is a vibrant portrayal of Dickens, at 31 years of age, already known the world over but with so much still ahead of him and in the midst of writing arguably his best-loved work, A Christmas Carol.”

The portrait was exhibited at the 1844 Royal Academy Summer Exhibition and became the defining image of Dickens.

It went missing shortly afterwards and was identified last year.

Louisa Price, curator at the Charles Dickens Museum in London, holding a portrait of the author by Margaret Gillies
Louisa Price, curator at the Charles Dickens Museum, holds the portrait (Rebecca Brown/PA)

Philip Mould, director of Philip Mould & Company which rediscovered the portrait, said: “We are thrilled he is finally checking into his London home after such a global adventure – it is an epic tale with a supremely happy ending.”

The Charles Dickens Museum is at the London townhouse into which Dickens moved with his young family in 1837.

The museum also received grants from the Art Fund and the Arts Council England/V&A Purchase Grant Fund to enable the portrait to join its permanent collection.

Arts Council England/V&A Purchase Grant Fund manager Julia Brettell said the portrait “depicts Dickens not only as a writer on the cusp of huge success, but also reflects his passion for social reform”.