LONDON (AP) — Britain’s House of Commons has approved an attempt by lawmakers to stop the country leaving the European Union in October without a divorce deal, sending it to Parliament’s unelected upper chamber for debate.

The House of Commons voted 327-299 to approve a bill that would force Prime Minister Boris Johnson to seek a further delay to Brexit rather than leave the EU without an agreement on the scheduled departure date of Oct. 31.

Lawmakers hope to have it passed into law by the end of the week. But pro-Brexit members of the House of Lords are threatening to try to stop it by filibustering — talking so much time runs out.

Johnson says Britain must leave the EU on Oct. 31, with or without a deal, and plans to seek a snap election if the opposition bill becomes law.