A man who tried to frame a neighbour for harassment has been jailed for 15 months in England.
Mark Webb, 42, wrote four letters to himself purporting to be from Frances Avis to give credibility to the allegations he had made against her.
Ms Avis was later found guilty of harassment and received a 24-week prison sentence after Webb gave evidence on oath against her. She did not go to jail after immediately lodging an appeal and winning.
Bristol Crown Court heard that suspicions about the author of the letters were raised when a police officer noticed a similarity in the handwriting on a criminal compensation form Webb had completed.
Prosecutor Sam Jones told the court there had been a "difficult history" between Webb and Ms Avis and in 2015 he accused her of harassment.
"The defendant, in an attempt to pervert the course of justice, made a complaint about Ms Avis's behaviour and sought to support that complaint by forging letters from her," he said.
She was charged and in February last year - on the strength of some of the forged letters - she was convicted by magistrates and sentenced to prison.
Her conviction was quashed the following August when police inquiries questioned Webb's credibility as a witness.
"Mercifully Ms Avis did not have to serve a day of that sentence but had been arrested and had been interviewed several times," he said.
"It is right to say she was not relieved of the threat of imprisonment until August 2016. The effect upon Ms Avis has been profound."
Mr Jones added: "This was a calculated, cunning and conceited attempt on behalf of the defendant to pervert the course of public justice and such a course of conduct strikes at the heart of the criminal justice system."
The court heard that one of Ms Avis's bail conditions banned her from her own home - effectively making her homeless.
At an earlier hearing, Webb, of Brook Road, Oldfield Park, Bath, pleaded guilty to four charges of attempting to pervert the course of justice.
Simon Goodman, defending, said Webb suffered from an "intellectual deficit" and a personality disorder.
"I asked him what he now thought about it and he said it was stupid. I asked him about the effect upon her and he said 'I don't know but I only did it for what she did to me'," he said.
"I cannot put forward remorse when it doesn't exist.
"He is a man who does not process well and acts impulsively."
Judge William Hart jailed Webb for 15 months and imposed a 10-year restraining order banning him from contacting Ms Avis.
He told him: "This was a serious and blatant effort by you to pervert the course of justice by dishonestly fabricating letters, and that strikes at the heart of our justice system.
"This was a calculated, deliberate and persistent course of conduct by you and it resulted in a substantial waste of police and court time. It was a wholesale attack upon the criminal justice system."
Judge Hart said that, had he been sitting in judgment on Ms Avis, he would have found her not guilty of harassment.
"There is no stain upon her character," he added.
After seeing Webb jailed, Ms Avis broke down in tears and had to be comforted by friends and police. She did not wish to speak publicly when she left court.