(CNN) — Boris Johnson was turned away from a polling station while trying to vote in the United Kingdom’s local elections after forgetting to bring photo ID – a requirement he introduced while prime minister.

Polling station staff were forced to turn the former prime minister away as he tried to cast his ballot in South Oxfordshire on Thursday, PA media reported.

Johnson returned later with the necessary ID and was able to vote.

New rules requiring photo ID to vote were introduced by Johnson’s Conservative government in the Elections Act 2022.

The law was widely criticized when it was introduced. The UK’s Electoral Commission warned in 2023 that the law could exclude hundreds of thousands of people from voting and particularly impact the unemployed or members of ethnic minorities.

report by a cross-party group of members of Parliament warned in March that millions of voters face being disenfranchised at the next general election due to the country’s electoral registration system.

It said the voter ID requirement “left individuals without the right ID being prevented from voting and only a number of forms of ID being permitted.”

Among those turned away from polling stations Thursday was army veteran Adam Diver, who said he was “gutted” when he was unable to vote his veterans’ ID card was not accepted.

Veterans minister Johnny Mercer apologized to Diver.

“The legislation on acceptable forms of ID came out before the veterans ID cards started coming out in January this year. I will do all I can to change it before the next one,” Mercer said.

Local elections were held across the country for more than 100 councils and several mayors Thursday.

With around a third of the results declared, the loss of more than 100 seats on local councils and one parliamentary seat in a by-election suggest that national polls in which Prime Minister Rishi Sunak and his party trail by a distance are correct.

The results also mean that if a general election were held tomorrow, the opposition Labour Party would almost certainly win power.

(Copyright (c) 2024 CNN. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox