Image caption Carl Sargeant was found dead four days after he was sacked as communities secretary

An attempt to force the publication of a report into whether the sacking of a minister who died days later was leaked before a cabinet reshuffle has failed.

Welsh Conservative leader Andrew RT Davies told the assembly that publishing the report, relating to Carl Sargeant's sacking by First Minister Carwyn Jones, was "morally right".

But a vote to trigger its publication failed to get enough support from AMs.

Labour won the vote by 29 votes to 26, with one abstention on the Tory motion.

Mr Jones had also threatened legal action over the vote.

Mr Sargeant, who was AM for Alyn and Deeside, was dismissed from his cabinet role by First Minister Carwyn Jones in November amid allegations of inappropriate behaviour, which he denied.

The leak inquiry was one of three ordered following the sacking and subsequent death of Mr Sargeant, who is thought to have taken his own life.

It found no "unauthorised" leaking of information on his sacking but its full details were withheld.

In a letter, First Minister Carwyn Jones had threatened legal action over the Tory call, which he said was unlawful for the presiding officer Elin Jones to allow to go ahead.

Image caption Andrew RT Davies said safeguards to protect witnesses could be put in place

Opening Wednesday's debate, Mr Davies said there was a "unique set of circumstances", insisting safeguards could be put in place to protect the identity of witnesses in the report.

He noted that the Welsh Government published a separate report on Tuesday, by James Hamilton, which cleared Mr Jones of misleading the assembly when responding to questions about alleged bullying in a previous administration.

The Labour government whip might deliver the vote to stop this motion, said Mr Davies, but it would not deliver what was "morally right" - the ability to have this report sitting alongside others.

Media playback is unsupported on your device Media caption BBC Wales political editor Nick Servini gives his view on what has been a "brutal week"

Plaid Cymru AM Adam Price said there was a "personal tragedy" at the heart of the debate.

Even a redacted report would allow us to glean more information than the "two brief paragraphs" ministers had issued on the report, he said.

He cited the principles of open government and accountability, quoting former US presidential candidate and campaigner Ralph Nader in saying parliaments have to remind governments that "information is the currency of democracy - its denial is always suspect".

Mr Price said the motion should be passed to show "our defiant refusal to be bullied into submission by an overweening executive".

Image caption Neil Hamilton called a threat of legal was extraordinary

UKIP Wales leader Neil Hamilton said it was startling to read the leaked letter threatening assembly Presiding Officer Elin Jones with legal action.

"I don't see why we can't have in this assembly something like the system of reading documents and having discussions on privy council terms, where we trust each other to do the decent thing," Mr Hamilton said.

"Shouldn't we aim to be better than those at Westminster," he added, after Labour AM Lee Waters said UK governments do not disclose leak inquiry reports.

Jeremy Miles, the Welsh Government's chief legal adviser and a member of the cabinet, said ministers were "seeking clarity" and would have preferred to have done so before the debate had taken place.

He urged AMs to vote against the motion, claiming it was outside the scope of the assembly's powers, relating to a report solely concerned with powers exercised by the first minister alone.

Image caption Jeremy Miles said ministers were "seeking clarity"

Mr Miles said he wanted to avoid prejudicing confidentiality, and warned that witnesses might be deterred from co-operating with future inquiries.

In the absence of agreement on how to proceed he said the government may ask a court to interpret the law.

Mr Miles said there is a "longstanding practice" of non-disclosure of leak inquiry reports.

"Today's motion is not in the Welsh Government's view an appropriate mechanism for the resolution of this issue," he said.

The first minister was absent from the Senedd chamber during the debate but returned for the vote.

A Welsh Government spokesman said: "We have been absolutely clear from the outset that we welcome debate, but have legitimate concerns as to the way that the assembly have chosen to interpret section 37 of the Government of Wales Act 2006.

"This is much bigger than any single debate or motion and something that requires a resolution regardless of the outcome today."