An anti-gay French MP, who strongly opposes equal marriage, accidentally voted in favour of it during a parliamentary debate on Tuesday.

Henri Guaino, who has written a book in opposition to measures to legalise equal marriage, admitted pushing the wrong button, and voting in favour of the measure to legalise same-sex marriage during Tuesday’s vote.

Speaking to French political website Le Lab, Henri Guaino admitted the mistake, and said he went to correct the it after he misfired during the debate.

“Did you see the chaos in there? I’ve never seen such a mess in the Assembly.

“There were three buttons flashing, and I pressed the wrong button. Afterwards, I went to the services of the Assembly to change my vote.”

Colette Capdevielle took to Twitter to poke fun at the MP, branding him “Gayoui”, a pun on his name. The new nickname translates in French to “gay yes”.

“Guaino even voted for gay marriage,” tweeted Daniel Goldberg. “Subconscious remorse?” he questioned.

On Tuesday the ruling Socialist party and their allies in the lower house of the National Assembly passed the bill 331 in favour – 225 against, giving same-sex couples the legal right to marry and adopt children.

Tensions caused by the bill were so high “legions” of police officers gathered outside the National Assembly with water cannons while the vote took place.

Following the vote, riot police charged several times to attempt to clear protesters from Les Invalides, however they were forced to move down to the banks of the river Seine, where more violent clashes took place.

The final remaining step before the bill becomes law is for it to be signed by President Francois Hollande, who gave his formal approval to the bill last November.

Yesterday President Hollande urged the country to move on after a divisive debate around equal marriage, a bill to legalise which passed on Tuesday, and which led to violent protests by opponents to the measure.