A candidate for Welsh Labour leader has criticised the way Wales' largest trade union declared who it was supporting.
The Unite union held a hustings with Jeremy Miles and Vaughan Gething, before announcing it is backing the latter.
It has now emerged Mr Miles was deemed "ineligible" to secure the union's support, which he said was due to "a new rule that no-one was aware of".
Unite defended the process and said it was satisfied it was done correctly.
Education Minister Mr Miles and Economy Minister Mr Gething are the two candidates hoping to succeed Mark Drakeford as Welsh Labour leader and first minister.
They are competing for the votes of Welsh Labour members as well as those of members of certain affiliated organisations, including unions such as Unite.
Mr Miles said he and Mr Gething attended a hustings event held by Unite's political committee on 16 January, after which the committee held a discussion to nominate its preferred candidate.
According to Mr Miles, it was at this point committee members were told "for the first time" that he was "ineligible to be nominated by the union due to a new rule that no-one was aware of, had not been published and which hadn't been applied previously".
Analysis by Gareth Lewis, BBC Wales political editor
A quiet leadership campaign has suddenly exploded into life.
Unite's endorsement matters because their members can also vote in this election. The message from the top can hold influence.
For some there are shades of the late Rhodri Morgan's defeat by Alun Michael in 1999 with strong union backing - in the days when there was a big block vote from unions.
Certainly for Mr Morgan's wife, Julie Morgan MS.
In response to Mr Miles's post on X, formerly Twitter, she wrote: "It is unbelievable that something like this has happened again. The same as 25 years ago."
Words and phrases being spoken privately are "stitch-up", "behaviour that undermines the election", and "people are furious".
And there's at least still one unanswered question: why didn't Unite tell, or remind, Mr Miles about the rule change before he started the hustings?
The rule, which the union said was decided last year, states that Unite "will only formally endorse candidates who have held elected lay office as representatives of workers".
As a result Mr Miles was ineligible.
Mr Miles said he was not made aware of the rule when he was invited to take part in the hustings and that he still had not seen evidence "the rule even exists for the purpose claimed".
"Members will rightly expect that rules to nominate a candidate for the next leader of our party and our government should be transparent and be applied fairly," he said.
"A long-standing trade unionist asked me a fair question, saying, 'If this can happen to a candidate for Welsh Labour leader and first minister how will lay members wishing to progress in the union be treated'?
"I did not want to make a statement like this, but so many union members have made it clear publicly that they are deeply unhappy with the way the nomination has been made."
Unite said: "During the Unite Wales Labour Party liaison committee meeting, the nominee in question was interviewed and his suitability considered.
"However, Unite's rules conference last year decided that Unite 'will only formally endorse candidates who have held elected lay office as representatives of workers'.
"Under this rule he was ineligible for nomination and Unite is satisfied that the nomination process was carried out correctly."
Mr Gething told BBC Radio Wales on Saturday that it was up to Unite to determine its own democratic processes, adding he was "proud to say I've been an active trade unionist".
"I think this explains why I've got the support of the five largest trade unions affiliated with the Labour party."