
The first minister has threatened legal action over the publication of a report into whether details about a cabinet reshuffle were leaked before the death of Carl Sargeant.
AMs are due to debate a Conservative call to publish the report.
Carwyn Jones asked the assembly's Presiding Officer Elin Jones to call it off, threatening court proceedings.
But Ms Jones has rejected the first minister's case, saying the debate will still go ahead.
Carwyn Jones wrote that calling off the debate, planned for Wednesday, would "bring the matter to an end without the need for court proceedings, which may otherwise need to be brought as a matter of urgency".
He said the presiding officer Elin Jones was acting "unlawfully".
Welsh Conservative Andrew RT Davies said it was a "direct challenge" to the legitimacy of the assembly.
Alyn and Deeside AM Mr Sargeant was found dead four days after being sacked as communities secretary in November following allegations about his conduct towards women.
A Welsh Government inquiry found "no evidence of prior unauthorised sharing of information", according to a brief statement.
But ministers have refused to publish the full findings of the inquiry, warning that doing so may reveal the identity of witnesses.
During Tuesday's First Ministers Questions, Carwyn Jones told AMs he was considering legal action because of the "lack of clarity" with the current rules that could "potentially" make any government document be releasable.
"If a whistle-blower came forward to a minister with a serious allegation on the basis of confidentiality and a document was created as a result of that, there is now no guarantee of confidentiality without further clarity."
He said did not want the leak inquiry debate cancelled but favoured it being postponed to allow a "protocol to be developed".
Conservative leader Andrew RT Davies, who wants a redacted version of the report published, accused Mr Jones of "trying to silence the assembly".
The Conservatives were hoping to win enough support to invoke a clause in the Government of Wales Act that would have forced publication of the report.
In his letter to the Presiding Officer Elin Jones, the first minister wrote: "We are concerned that the assembly has acted, and threatens to continue acting, unlawfully."
If the Tories' motion is not withdrawn, he adds: "I reserve the right to bring proceedings for judicial review."
Government officials said they would want the courts to rule on the interpretation of the law.
But in response the presiding officer said: "I have taken advice and carefully considered your arguments. Having done so, I am not persuaded of the case which you have advanced.
"As a result, the motion remains scheduled for debate."
At a press conference on Tuesday, Mr Davies: "It is my understanding that it is unprecedented for the executive to seek to stop assembly business that the presiding officer had ruled in order.
"We're in unchartered territory."
Mr Davies said he would not be "fobbed off by white collar civil servants".
Thumping the table in anger, Mr Davies said: "There's a bloke who lost his life here.
"It's our duty as politicians to get answers... to make sure this never happens again."
Neil Hamilton, UKIP Wales leader, called Mr Jones's answers in First Minister's Questions "tortuous" and "legalistic", comparing them to the Watergate scandal that destroyed Richard Nixon's presidency in America in the 1970's.
"It wasn't the break-in that actually brought down Richard Nixon but the attempted cover up," Mr Hamilton said.
"The president in that case said if the president does it, its not illegal.
"Does the first minister really want to go down in history as the tricky dicky of Welsh politics?"
"No one suggests that anyone is above the law," said Mr Jones, dismissing Mr Hamilton as "the man that defends Enoch Powell".

The Tories planned to use section 37 of the Government of Wales Act to compel the permanent secretary - the government's top civil servant - to publish the report.
A Welsh Government spokesperson said: "This is much bigger than any single debate.
"The way section 37 is being interpreted by the presiding officer puts Welsh Government in the perverse position where we could be compelled to publish information without regard for any other laws or rights.
"We believe this is unlawful and given the significance of the issues surrounding section 37 we will seek proper determination by the courts."
The government said there was a danger section 37 could be used to compel the release of sensitive information, including personal details or commercial confidential contracts without regard for data protection and other laws and regulations.
It said it had proposed a "sensible way forward" to the assembly commission - the body responsible for day-to-day business in the assembly - by suggesting lawyers for the two sides sat down to find a compromise.