Media playback is unsupported on your device Media caption Nigel says he feared his children might be attacked after he was wrongly arrested

When Nigel Lang was wrongly arrested on suspicion of sharing indecent images of children, he says his life fell apart. It all stemmed from nothing more than a typing error by police.

"When I was arrested, I feared what was going to happen to me.

"What about my family, will they be targeted? Will they target my mum's house? Will they be getting sworn at and attacked in the street?"

Speaking to the BBC's Victoria Derbyshire programme, Nigel Lang recalls the questions racing through his head one July morning in 2011.

Aged 44 at the time, he had been working as a drug recovery worker, helping young people combat substance abuse.

But when police came to search his home and arrest him, on suspicion of sharing indecent images of children, his life changed.

His reputation has been left "in tatters", he is unemployed and suffers mental health problems, he says.

Not that he knew at the time, but it was all the result of a typo.

'It made me paranoid'

In May 2011, officers at South Yorkshire Police were informed by colleagues in Hertfordshire that they had identified an IP address from which more than 100 indecent images of children had been shared in April that year.

The IP address passed on corresponded to an internet account held by Nigel's partner. But it had been typed incorrectly, with an extra digit added by mistake.

When Nigel was arrested, all he could do was to repeatedly assure himself the police would discover the truth.

"You say to yourself, 'Well they're going to find nothing and I haven't done anything, so I'll be alright.'

Image copyright Getty Images Image caption Nigel's job had been to help young people combat drug abuse

Nigel spent the following weeks living away from home, with his mother.

His young son, he says, could not understand why he had disappeared and would cry.

After three weeks, police returned Nigel's computers to him, and he had been found completely innocent. But the events had caused a deep psychological effect.

"Because of what happened I felt unable to go back into the field of work I was working in," he says. His role as a drug recovery worker had involved helping teenagers.

"It was the best job I'd had in my life, and I felt I was really good at it.

"But I became fearful of working with young females in case any of them said I tried any sexual advances. It made me paranoid."

'Shouting my innocence'

Eleven months after his arrest, and still without knowledge of why his home had been raided, Nigel began the search for answers - filing a complaint against South Yorkshire Police on grounds of racism and sexism.

He believed he had been unfairly targeted, given that the internet account had been registered to his partner - who is white - but she had not been investigated.

The complaint was dismissed, but it was during this process he first learned of Hertfordshire Police's involvement in the case.

He asked whether it might be possible to check if the cause of his arrest had been incorrect information supplied by those in Hertfordshire, but says he was told that "owing to the passage of time" this would not be possible.

Image copyright Getty Images Image caption An extra digit had been added to the IP address by mistake.

Nigel decided to ask his solicitor to look deeper. The lawyer contacted Hertfordshire Police and discovered the truth of the incorrect IP address.

Nigel says: "I've had to pay a solicitor to find out the mistake, when the police could have done that. That is what hurts.

"I'm screaming and shouting my innocence and they tell me they couldn't do it, but then I get a solicitor and he can.

"It shows me they don't care about my life. They don't care about ordinary people."

Nigel received an apology, in writing, from Hertfordshire Police in 2014, which accepted responsibility for the error.

'Six years of fighting'

Following Hertfordshire Police's admission, Nigel sought compensation for a breach of the Data Protection Act 1998, false imprisonment, police assault/battery, and trespass by police.

In October 2016, Hertfordshire Police settled out of court. Nigel received damages of £60,000, plus legal costs.

"It isn't enough money," Nigel says, "but after six years of fighting, you're tired.

"I didn't even get two-and-a-half years' wages. I haven't worked since.

Image copyright Thinkstock Image caption Hertfordshire Constabulary has admitted it made a mistake

"If you could take away somebody's livelihood, then surely it's worth more than someone else's wages."

In a 2017 statement to the BBC, Hertfordshire Police said it "made an early admission of the mistake once it had been identified and would like to apologise again for the wrongful arrest and further impact caused".

"It was an administrative error which led to this occurring, and lessons have been learnt to help prevent this happening again.

"This man was completely innocent and compensation has now rightfully been settled."

South Yorkshire Police said it recognises "Mr Lang's arrest in these circumstances was extremely distressing for him and his family... he has been rightly compensated by Hertfordshire Constabulary."

'My personality has changed'

Nigel - who first spoke to Buzzfeed News earlier this month - has decided to open up about the ordeal in order to clear his name.

"I didn't have my day in court, and I need the world to know I'm not a paedophile.

"I was an ordinary hardworking person who has been reduced to benefits, and I don't know what the future holds for me.

"I'm ill because of it, suffering from post-traumatic stress disorder.

"My personality has changed. I'm more angry, I struggle with a lack of sleep and am hyper-vigilant around people, being paranoid that people are talking about me."

He says his loved ones were the reason he managed to pull through.

"My children were great. They never wavered and supported me all the way."

Watch the Victoria Derbyshire programme on weekdays between 09:00 and 11:00 on BBC Two and the BBC News channel.