British Prime Minister Boris Johnson | Peter Summers/Getty Images Boris Johnson says ‘we’ve done it’ as parliament approves Brexit agreement ‘Now we can put the rancour and division of the past three years behind us,’ says UK PM.

LONDON — Boris Johnson on Wednesday hailed the safe passage through parliament of the law needed to take the U.K. out of the European Union.

In a statement issued after the Withdrawal Agreement Bill was passed by both the House of Commons and the House of Lords, the U.K. prime minister said: “At times it felt like we would never cross the Brexit finish line, but we’ve done it."

“Now we can put the rancour and division of the past three years behind us and focus on delivering a bright, exciting future – with better hospitals and schools, safer streets and opportunity spread to every corner of our country.”

Former Prime Minister Theresa May, who lost her parliamentary majority in a 2017 snap election, tried and failed three times to get her Brexit agreement through the U.K. parliament.

After taking over as leader of the Conservative Party, Johnson won an 80-seat majority in last December's general election with a pledge to take the U.K. out of the European Union by January 31.

The European Parliament will hold its own vote on the Brexit agreement next Wednesday, before Britain is due to formally leave next Friday at 11 p.m. U.K. time.