Anti Brexit campaigner Steve Bray shouts through his megaphone outside Conservative leadership contender press conferences, in London, Tuesday, June 11, 2019. (AP Photo/Kirsty Wigglesworth)

LONDON (AP) — British opposition lawmakers failed Wednesday in their latest attempt to ensure the U.K. can't leave the European Union without a divorce deal.

The House of Commons voted 309-298 against setting aside a day later this month to try to pass legislation that would prevent a no-deal Brexit.

"This is a disappointing, narrow defeat. But this is just the start, not the end of our efforts to block 'no deal,'" said Labour Party Brexit spokesman Keir Starmer.

The governing Conservative Party is holding a contest to replace Prime Minister Theresa May, who quit as party leader last week after Parliament three times rejected her divorce deal with the EU.

Some of the 10 contenders, including front-runner Boris Johnson , say if they become prime minister, they would take Britain out of the EU on the twice-extended withdrawal date, now set for Oct. 31, with or without an agreement.

Many economists have argued a no-deal Brexit would cause economic turmoil and plunge Britain into recession. But Johnson and other Brexiteers say the Conservative Party will be destroyed by angry voters if Brexit is delayed again.

Parliament has already voted against leaving the EU without an agreement on divorce terms, but there is no easy way for lawmakers to stop a government that is determined to carrying out Brexit without a deal.

Opposition legislators fear a pro-Brexit prime minister could even suspend Parliament to force a no-deal exit.

Starmer said Wednesday's defeated motion would have ensured that "If the next prime minister is foolish enough to try to pursue a no deal Brexit . then Parliament would have the means to prevent that."

British Conservative Party lawmaker Boris Johnson leaves his home in London, Tuesday, June 11, 2019. Britain's Conservative Party is holding an election to replace Prime Minister Theresa May, who resigned last week after failing to lead Britain out of the European Union on schedule. Former Foreign Minister Boris Johnson is currently the bookies favorite to replace May. (AP Photo/Frank Augstein)
Labour Party leader Jeremy Corbyn leaves the Government Buildings in Dublin following a meeting with Taoiseach Leo Varadkar as part of a visit to Ireland, Thursday May 30, 2019. (Brian Lawless/PA via AP)