First Minister Vaughan Gething has lost a vote of no confidence in his leadership in the Welsh Parliament.
After a tense and passionate debate in the chamber, 29 Senedd members voted in favour of the resolution, while 27 voted against.
Mr Gething is not obliged to quit, as the result is not binding, but it places him under additional pressure after weeks of criticism.
The Senedd vote was called by the Conservatives over donations made to Mr Gething’s leadership campaign by a company owned by a man previously convicted of environmental offences.
There are 60 members of the Welsh Parliament – Labour holds exactly half of the seats with 30 members, while there are 16 Tories, 13 Plaid Cymru members and a solitary Liberal Democrat.
Mr Gething replaced Mark Drakeford as Wales’ first minister in March, defeating Jeremy Miles in a Welsh Labour leadership contest.
Since then, he has faced criticism – including from those in his own party – over the donations, while also being questioned over Covid-era text messages and the sacking of a minister for allegedly leaking information to the media, which she denies.
The result will also be uncomfortable for the UK Labour Party in Westminster, less than a month ahead of a general election.
In the debate leading up to the vote, Mr Gething said he regretted a motion “designed to question my integrity”.
“Like so many of you in this chamber, I have dedicated my adult life to public services and to Wales,” he said.
“Even in the midst of an election campaign, it does hurt deeply when my intentions are questioned.”
He said he would “not shy away from scrutiny and challenge”.
The first minister said that he and “so many people of colour have been traduced and vilified merely for raising concerns about how some of these debates have been handled”.
“I will continue to put Wales first, first in thought, deed and ambition, as I serve and lead my country,” he added.
Opening the debate, earlier, Welsh Conservative Senedd group leader Andrew RT Davies rejected accusations from some in Labour that the no confidence motion he was bringing was a “gimmick”.
“This is a motion put down in opposition time that might well not be binding, but will send a significant message on the transparency, the honesty and the judgement call of the first minister since he assumed office,” he said.
“That is not a gimmick.”