British lawmakers on Tuesday gave green light to go for an early general election after a crucial vote that followed hours of debate.

The election will be held on Dec. 12 after the bill submitted by the government received 438 votes in favor and 20 against.

The vote aims to break the deadlock in the House of Commons over Brexit.

An opposition amendment to hold the proposed election on Dec. 9 was defeated in an earlier vote.

The decision to go to polls came on the day the EU formally adopted a flexible extension — dubbed “flextension” — until Jan. 31, 2020, which means the U.K. can leave the union if the revised Brexit deal is ratified by the House of Commons on an earlier date.

Prime Minister Boris Johnson, who had insisted that the U.K. would leave the EU on Oct. 31, had to ask for an extension after failing in a vote that would fast-track the legislation of his deal last week.

The EU Withdrawal Agreement Bill passed the first stage of legislative process last week but the process was paused by Johnson when he failed to receive approval on a timetable to make it law before the previous deadline of Oct. 31.

The UK decided to leave the union in a 2016 referendum.

Read more: UK set to go to polls for early election on Dec 12