A former journalist who claims he was framed for the unsolved murder of a French film maker in Ireland has said he was suicidal over it.
Ian Bailey, 57, an English reporter who moved to west Cork more than 23 years ago, was twice taken in for questioning over the killing of Sophie Toscan du Plantier.
The 39-year-old producer was found by two neighbours beaten to death outside her holiday home on a remote west Cork hillside on the morning of December 23 1996.
Her killer was never found.
Mr Bailey told the High Court in Dublin - where he is suing the Irish State for wrongful arrests and mistreatment by detectives in the year after the killing - that he could see no way out of the alleged conspiracy.
"I don't think I handled it very well in the early days," he said.
"I got to the edge, where I was contemplating the possibility of suicide.
"I was in a place of complete despair and hopelessness."
During his second day of evidence at a packed number three court in the Four Courts, Mr Bailey also detailed a death threat he faced when he was first taken in for questioning and named the Garda he claimed issued it.
Mr Bailey said three officers came to his home at Prairie Cottage, Liscaha, Schull, Co Cork, on the morning of February 10 1997, to arrest him over Mme Toscan du Plantier's murder.
He identified the driver of the Garda car as Detective Garda Liam Hogan.
"The driver of the car told me even if we don't pin this on you, you are finished in Ireland, you will be found dead in a ditch with a bullet in the back of your head," Mr Bailey told the court.
"I interpreted that as a death threat.
"It haunts me to this day, honestly.
"It's just one of those things that you remember quite clearly.
"It's a bit of a nightmare really."
Almost 20 years since Mme Toscan du Plantier's murder - wife of late French film maker Daniel Toscan du Plantier - Mr Bailey is suing the Garda Commissioner, the Minister for Justice and the Attorney General for the handling of the investigations.
He claims wrongful arrest and mistreatment by the Garda.
Mr Bailey is suing for false imprisonment, assault, battery, trespass of the person, intentional infliction of emotional and psychological harm, harassment and intimidation, terrorising and oppressive behaviour and a breach of his constitutional rights.
The jury of eight men and four women was told the State denied all claims.
Mr Bailey told the court he became a pariah in west Cork after he was arrested and publicly identified.
The small circle of friends he shared with his partner Jules Thomas collapsed to just one or two people and for much of 1997 he did not go out and he became quite isolated.
"People heard rumours," Mr Bailey said.
"The dreadful, rotten, stinking lie that I had something to do with the murder."
The second arrest took place on his birthday, January 27 1998, the court heard.
Mr Bailey revealed that the first time he realised he would not be prosecuted over the unsolved killing was in 2007 - almost 10 years later.
Mr Bailey recalled being in the Galley bar in Schull with Ms Thomas in late June 1997 when he was approached by a woman later identified as local shopkeeper Marie Farrell.
"She said she had been receiving a lot of visits by the gardai and that she and her husband did not want to see an innocent man framed," he told the jury.
Mr Bailey attempted to meet Ms Farrell in her shop some time afterwards but later that year gardai cautioned him over allegations he had intimidated and threatened the shopkeeper.
He denied any wrongdoing.
Several years later, following a libel trial on the reporting of the Toscan du Plantier investigation, Ms Farrell approached Mr Bailey's solicitor in Cork, Frank Buttimer, over statements she made putting Mr Bailey at Kealfadda bridge near Mme Toscan du Plantier's holiday home in Toormore in the early hours of December 23, around the time of the murder, the court heard.
The jury was told the development led to an internal Garda review of the case overseen by Ray McAndrew, Assistant Garda Commissioner.
Mr Bailey said: "I always prayed the Lord's Prayer ... that the truth would come out."
The jury was also told of intimidation Mr Bailey suffered in Prairie Cottage including menacing phone calls, graffiti, rubbish dumped at the gates and a dead rat in the post.
Mr Bailey said that after the arrests his mind was so troubled it took him five years to read a book and he quickly lost a lot of weight.
"Emotionally I was gutted. I was overcome quite often by feelings of great despair," he told the court.
"There was a feeling that nothing I could do would end this."
Mr Bailey, who has since graduated with a degree, was born in Manchester and moved to Gloucestershire when he was nine and embarked on a career as a freelance journalist in Cheltenham in the 1980s.
He walked away from the media business in 1991 after becoming disillusioned and moved to Ireland, settling briefly in Waterford and then west Cork.
Mr Bailey said he was making inroads to get back into the industry when Mme Toscan du Plantier was murdered.
On the day the news broke, the court heard he got a call from journalist Eddie Cassidy, then of the Cork Examiner, at 1.40pm - at that time it was only known that there had been a suspicious death.
Mr Bailey told the court he drove to the crime scene with Ms Thomas, who brought her camera, but got no answers from uniformed gardai.
He then went to the local post office and found out that the house near where the body was discovered was owned by a French family and the name Bouniol - Mme Toscan du Plantier's maiden name - was in the phone book.
Mr Bailey said it was the only story in the whole of west Cork the following day, with locals talking about how Mme Toscan du Plantier had been beaten to death.
"It was like a mini nuclear device going off. It was a very big shock and it spread out," he told the jury.
"There was no other topic of conversation. Everybody seemed to know the details of it, how they knew I didn't know."
There was standing room only for most of the day in court number three of the Four Courts as Mr Bailey gave evidence.
The case is expected to last at least six weeks.