British Prime Minister Boris Johnson’s post-Brexit trade deal was approved by the U.K. Parliament less than 24 hours before the country’s final split from the European Union.

The House of Lords gave the green light to the agreement late Wednesday, just a day before the U.K. leaves the EU single market when the transition period expires at 11 p.m. Thursday.

Johnson thanked members of Parliament for backing the "historic” legislation, which turns the accord he signed with the EU into British law.