John Clark, of Carnock, was hounded for six years’ worth of back tax before a judge ruled that Her Majesty’s Revenue and Customs had been “inordinate” and “outrageous” in its handling of the situation and scrapped the bill.

Having worked as a self-employed painter and decorator, Mr Clark relied on his wife to deal with his paperwork but they separated in March 2003 and she died in 2013. His daughter, a schoolgirl at the time her parents split up, stayed with him and he had sole responsibility for her care.

A first-tier tribunal heard Mr Clark suffered severely from depression, was dyslexic and had serious learning difficulties, with a mental age of about 12. He explained that he had difficulties with reading, writing and spelling.

On one occasion, he had asked an official to complete a form for him. After she spelled out the words, he wrote them down in capital letters – taking 15-20 minutes to write down just four lines.

Furthermore, his home was damaged extensively by fire in early 2006 and he was unable to return for almost a year. Some contents, including personal papers, were destroyed and the delivery and receipt of his personal mail was also disrupted over an extended period.

However, despite his difficulties and vulnerability, HMRC hit Mr Clark with a bill of £17,779.94 for failing to declare income tax over six years.

Mr Clark explained that he couldn’t remember receiving tax returns or demands for payment and he wouldn’t have appreciated the significance of such documents.

He had received a “charge” from HMRC in February 2010 in respect of tax allegedly due but he had not appreciated its significance.

With his daughter’s help, he wrote to them in June 2011 but received no reply – only the returned letter which was marked “sent to wrong department”.

Despite attending three meetings at the Dunfermline office, he was unable to communicate satisfactorily with staff as they had not appreciated his learning difficulties.

Tribunal judge Kenneth Mure said that Mr Clark had been an “entirely credible witness” who was “frank, candid and utterly lacking in guile”, adding that he had “no hesitation” in accepting his evidence as a true account of the difficulties he faced.

HMRC’s pursuance of the matter was described as “unconscionable,” with Judge Mure citing the behaviour to be “completely unreasonable, unreasonably excessive, inordinate, or outrageous”.

He said that HMRC’s reasoning was “too narrow, inadequate and lacking in consideration of the appellant’s peculiar vulnerability” and added, “It ignores his inability to engage fully and satisfactorily with the tax authorities.

“It neither recognises nor makes any concession to his vulnerability.” A spokesperson for HMRC said, “We aim to treat all our customers with fairness, respect and compassion but we clearly got it very wrong in this case and badly let down a vulnerable customer who we should have helped.

“We apologise unreservedly to Mr Clark for the worry and stress we caused him. We will investigate what happened in Mr Clark’s case, to ensure that this doesn’t happen again.”