Former Welsh first minister Carwyn Jones has lost a High Court appeal to allow text messages relating to the behaviour of former Welsh Government minister Carl Sargeant to be heard at his inquest.

Lord Justice Haddon-Cave said coroner John Gittins had not acted unreasonably by excluding the texts from evidence, describing arguments that they could explain why Mr Sargeant took his own life as "speculation".

On Thursday the former first minister's lawyers told the High Court in Cardiff that the failure to hear evidence from the leader and deputy leader of Flintshire County Council, Bernie Attridge and Aaron Shotton, whose texts have been kept from the public, meant the inquest was not a "full, fair and fearless investigation".

Cathryn McGahey QC, representing Mr Jones, said: "The coroner has been unduly influenced by the completely understandable wish not to cause distress to the Sargeant family.

"We say Bernie Attridge had highly relevant knowledge about what caused Mr Sargeant to take his own life. He was aware of matters preying on Mr Sargeant's mind.

"We have an exchange between two independent witnesses who know what they are talking about."

Ms McGahey said the inquest would be "incomplete" and "one-sided" if the text messages were not included, adding: "It is unknown, in my experience, for a coroner investigating a suicide not to look at the factors that caused that individual to take his own life."

Sophie Cartwright, for the coroner, argued the inquest was a "limited fact-finding inquiry", and said finding out the reasons why Mr Sargeant took his own life were not included in statute, nor was it required to come to a conclusion of suicide.

Lord Justice Haddon-Cave said senior coroner Mr Gittins had acted correctly and "well within his scope of discretion", and the application to have the text messages included was "based on speculation as to what that evidence may or may not show".

He added: "It is indeed unfortunate the bringing of this application may give rise to further unnecessary speculation about this evidence.

"It is not appropriate for courts to intervene on the basis of speculation.

"We have seen nothing to suggest the coroner in this case acted anything other than fairly and in accordance with his statutory duty under Section 5 of the Coroners Act.

"Carl Sargeant tragically died almost exactly 18 month ago. It is important there is no further delay and that the inquest is resumed and concluded as soon as possible."

The inquest is scheduled to resume on July 8 after it was adjourned in late November when Mr Jones challenged the North Wales coroner's ruling on the text messages.

Mr Sargeant, 49, was discovered hanged at his home in Connah's Quay, days after his removal as a cabinet minister following allegations of sexual misconduct made by three women.

His family have said he was not told the details of what he was accused of and was unable to properly defend himself.

Following his death in November 2017, then-first minister Mr Jones announced an independent inquiry into how he had handled his former minister's sacking after pressure from Mr Sargeant's family and Labour politicians.

In March Mr Sargeant's widow Bernie won a High Court challenge into the legality of the inquiry after judges ruled it had been "unlawful" for Mr Jones to have been involved in setting up the protocols.