The death of a former detective who hanged himself with a bed sheet in his prison cell was inevitable, an inquest has heard.

Peter Foster had made several attempts on his life in the years before he was found dead at Lewes Prison early on July 30 2012, according to his friend Jonathon Carver.

The inquest at Eastbourne Town Hall heard that Foster had been on the acute health care ward at the prison while on remand and was kept on the highest level of observation because he was deemed a high suicide risk.

But a month after he was sentenced for the murder of his partner, Heather Cooper, and just days after his observations were relaxed to every hour, he was found dead.

Foster was jailed for life and told he must serve a minimum of 17 years at Lewes Crown Court in June 2012 for hitting Detective Constable Cooper, 33, over the head 10 times with a baseball bat and stabbing her in the throat at their home in Haslemere, Surrey, before dumping her body in a shallow grave in Blackdown Woods, near Lurgashall, West Sussex, in October 2011.

Mr Carver, who is representing Foster's grandmother Marguerite Howkins at the inquest, said not being able to see his children after his arrest had a "profound affect on him".

He said a difficult start in life saw Foster being abandoned by his mother and brought up by his grandmother, and that he was very hard on himself as a result.

He also had a difficult relationship with his father as he did not get on with his step-mother.

Mr Carver said Foster was prone to bouts of depression which became worse if he drank to excess.

He told the court that Foster took the murder of his father in January 2009 badly and lost his job shortly afterwards when he committed a drink driving offence.

Foster, who retrained as a plumber, tried to take his own life in 2009 when he was found close to death on his father's grave having taken pills and alcohol, Mr Carver said.

He said his friend had a faith and believed in life after death.

The court also heard that he had said to his grandmother while he was in prison: "The Foster men die young."

Mr Carver said: "We expected that Peter would die. For us it was a matter of when, not if"

He said Foster was "full of remorse" for what had happened and he believed his friend had made his mind up about dying before he was sentenced, but that it may have pushed him over the edge.

He added: "We think that Peter's death was inevitable and that they (the prison staff) could not have stopped it.

"We believe the prison did what they could for him."

Prison officer Geoff Gordon who worked on the ward described Foster as a pleasant and calm man who was interesting, vulnerable and bright.

He told the inquest that Foster was upstairs in the health care unit in a cell with a perspex door, where he could be constantly observed because he was seen as a high suicide risk.

He told the court that he was aware that Foster had tried to take his own life while on remand after getting hold of some pills.

But after he was sentenced he was moved downstairs where prisoners are not observed as frequently, the court heard.

Mr Gordon said the decision to relax Foster's regime did not lie with one person because "the burden would be too big if it went wrong".