The weight of history and democratic principle stacked against Vaughan Gething

After a tumultuous first few weeks as First Minister Vaughan Gething has now lost a confidence vote in the Senedd. There is an unwritten but widely accepted rule that no Prime Minister or First Minister who cannot command the authority of the parliament they work in can stay in that role.

As it stands now there is no indication that Mr Gething will resign despite that flying in the face of one of the most obvious, longstanding, and striking political and parliamentary conventions. Indeed it appears he will remain steadfast. In media remarks straight after the vote he said he will "carry on doing my duty". He added: "I'm here, proud to be the First Minister of Wales, to serve and lead my country.

"That's what I've done today. It's what I'll carry on doing." See how every MS voted here.

READ MORE: Vaughan Gething breaks down in tears during no-confidence vote

READ MORE: Labour politician offered to give Vaughan Gething £200,000 to pay back campaign donation but he refused

His supporters who have spoken up have been at pains to point out this was "a non-binding" vote. However something being non-binding does not mean it is irrelevant. The 2016 referendum on leaving the European Union was non-binding. However we did leave the EU because no government can defy the democratically-expressed will of the people. And until now, in several centuries of democratic history on these islands, no leader has survived losing a vote of no-confidence in the parliament they are meant to lead.

But can Mr Gething defy the weight of history, convention, and democratic principle stacked against him? Legally and constitutionally this is complicated because there is no part of Senedd rules that says a First Minister has to be ousted in these circumstances. For the latest analysis of the biggest stories sign up to the Wales Matters newsletter here.

Every week the Senedd is sitting, opposition politicians can put forward debates on a topic of their choosing. The Conservatives have chosen to use their slot to debate their confidence in Vaughan Gething's performance as First Minister. The fact it is non-binding means Mr Gething does not have to simply go along with it.

He does not legally, or constitutionally have to stand down. However the reality of having a First Minister in charge who does not have the support of members is unheard of in any parliament. If Mr Gething flouts that convention it would be staggering even if, as he was at pains to point out, the 29-27 vote could largely be explained by two Labour members being absent through illness and the refusal of opponents to pair and thus cancel out those absences. That context can easily be lost though. One source explained it thusly: "Does someone on the street of Abertillery really understand the difference between a binding or non-binding vote? The Senedd will have voted that they have no-confidence in the First Minister."

The Senedd is just 25 years old and convention and precedent is therefore hard to find. However in 2000 Alun Michael, then First Secretary as the post was called, was due to face a no-confidence vote tabled by Plaid Cymru. He quit as both Welsh Labour leader and First Secretary before the vote to avoid the humiliation of losing it, also resigning from the Welsh Assembly shortly after. More recently in Scotland the SNP's then First Minister Humza Yousaf also stood down rather than face defeat in two upcoming no confidence votes.

In Wales there have been no-confidence votes against other ministers but none that those ministers lost. Looking back to the early days of the then-Assembly Christine Gwyther faced and survived one and in more recent times health ministers Vaughan Gething and Eluned Morgan both have too.

If we look to the UK Parliament, founded in 1707, there is more precedent there to follow. The UK Parliament's Commons Library says: "It is a core convention of the UK’s constitution that the Government must be able to command the confidence of the House of Commons. This convention governs both the appointment and resignation of Prime Ministers. If a Government loses a confidence vote in the House of Commons, the Prime Minister will be expected either to resign, or to request a dissolution of Parliament from the Queen. If a dissolution is granted, it triggers a general election."

The fact this Senedd vote is non-binding is what makes the question "what happens next" a little trickier. Senedd rules, known as standing orders, explain what happens if there is a vote of no confidence in Welsh Government ministers as a whole rather than the First Minister as an individual. There is no straight forward mechanism for that to happen in constitutional terms.

Join our General Election WhatsApp community by clicking on this link, and selecting 'Join Community'. No one else will be able to see your personal information and you’ll only receive messages from WalesOnline’s team. You will receive updates from us daily and through the night on July 4.

For Mr Gething to be forced out it would have to be because there has been a no-confidence vote in all his government. There is provision for that to happen and happen relatively quickly. If six MSs, of any party, write to the Llywydd (presiding officer) and say they do not have confidence in the government she has to hold a vote within five days.

If that vote passes the ministers – as a group – have to resign. However there cannot be a period without a First Minister and they would stay on in the role. From the date that no-confidence vote is passed there are 28 days in which MSs can put someone else forward as a First Minister. If no First Minister is appointed by the end of day 28 the presiding officer has to call an "extraordinary general election".

Laura McAllister is professor of public policy and the Governance of Wales Centre. Speaking ahead of the vote she said: "If the vote is carried today it has no effective legal or constitutional import but the optics are disastrous. The context is the interesting one because everyone presumed the general election had come at the right time for Vaughan but actually it could backfire completely because now it's likely to go this way the election is even more of a negative for him.

"If a vote is tabled in an individual minister, and the FIrst Minister is an individual minister, it has no import. It has to be tabled in the ministers and that activates the presiding officer to follow the procedure within five days – that's the nuclear option."

However that does not remove the First Minister. Prof McAllister however says that it would "inconceivable" for the First Minister to survive if we get to that point.

Whether he now clings on following this loss, Prof McAllister says, comes down to "politics and optics". Labour has briefed that the whole motion was just a "cynical gimmick" and a Conservative-led election tactic which Plaid has backed and said Mr Gething has effectively lost on a technicality a consequence of two members being off work ill.

But Prof McAllister said: "It shows there is a concerted opposition to him within the Senedd and that reflects public discontent with the behaviour of the donations and the opinion polling validates that with the high disapproval ratings in the ITV Wales/YouGov poll this week. In the middle of an election where UK Labour is playing the 'we're a new party with clean hands and we want to move away from the cronyism and corruption of previous governments' [line] then to have this, that it's about 'donationgate', is hugely damaging to that narrative.

"We always said when Vaughan Gething was elected that he was on pretty fragile, vulnerable ground but as long as he was regarded as an electoral asset to UK Labour he would be okay and we always said when the election was called it was lucky for Vaughan. That's been turned on its head because the optical damage during an election campaign when everything is incredibly disciplined is a problem and, secondly, he is less likely to be considered an electoral asset and more of a liability".