Welsh Labour’s plans were expected to end in a tied vote after all three opposition parties vowed to vote against it.
However, the proposals scraped through by 28 votes to 27 after Conservative MS Gareth Davies was unable to get onto Zoom to cast his vote remotely.
Darren Millar, the MS for Clwyd West, could be heard trying to intervene on behalf of his colleague, according to WalesOnline.
But he was told by presiding officer Elin Jones that all attempts to get him onto the relevant software had taken place.
The Welsh government will press ahead with the plans next week despite calls for a re-vote.
Asked about the close vote, first minister Mark Drakeford told BBC Radio 4’s Today programme: “It was an extraordinary moment, but what was really extraordinary was the fact that opposition parties were not prepared to support this simple measure which will help to keep people safe from coronavirus.”
He added: “The vote is taken on the floor of the parliament, the way the vote is conducted is not for the government, that is for the parliament. It is members’ responsibilities to make sure they are in the chamber or on Zoom and 59 of 60 members managed to do that.”
The Senedd was sitting in a hybrid format, with some of the 60 members present while others attended the session remotely.
The Welsh Conservatives said the incident highlighted why significant votes should be held in person.
“A number of members across political groups experienced technical difficulties with the voting system this evening, which demonstrates why the hybrid Parliament in Wales must come to an end,” a spokesperson said in a statement reported by WalesOnline.
“We reaffirm our view that such significant votes should be held in person on the floor of the Senedd and Welsh Conservatives remain steadfastly opposed to the introduction of Covid passports.”
The new rules, which come into force from Monday 11 October, will require people in Wales to use the NHS Covid pass to show their vaccination status or recent negative test result before attending certain events.
It will be mandatory for entry to nightclubs, indoor non-seated events for more than 500 people, such as concerts, outdoor non-seated events for more than 4,000 people, and any setting or event with more than 10,000 people in attendance.
Tuesday’s technical blunder was not the first mishap to change a Senedd vote.
In 2006, the Welsh government was forced to hold a public inquiry into the ambulance service after health minister Brian Gibbons, who was opposed to the move, accidentally pressed the wrong button in the chamber when it was time to vote.
Register for free to continue reading
Registration is a free and easy way to support our truly independent journalism
By registering, you will also enjoy limited access to Premium articles, exclusive newsletters, commenting, and virtual events with our leading journalists
Already have an account? sign in
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies