LONDON (AP) — British Prime Minister Boris Johnson’s governing Conservative Party lost a special election early Friday, leaving it with a one-vote working majority in Parliament as Brexit looms.

In the Conservatives’ first electoral test since Johnson became prime minister nine days ago, the party was defeated for the seat of Brecon and Radnorshire in Wales by Jane Dodds of the opposition Liberal Democrats. Dodds won 43% of the vote, while Conservative Chris Davies, who was fighting to retain the seat after being convicted and fined for expenses fraud, got 39%.

The result makes it harder for Johnson’s government to pass laws and win votes in Parliament, with Brexit scheduled to happen in less than three months.

Johnson says Britain will leave the European Union on Oct. 31, with or without a divorce deal. But Parliament voted in the past against the country leaving the EU without an agreement on the terms, and is likely to try again in the fall to thwart Johnson’s plans.

In her victory speech, Dodds urged the prime minister to “stop playing with the future of our communities and rule out a no-deal Brexit now.'”

She said “a no-deal Brexit would be a disaster for our farming and agricultural communities.” The constituency she now represents is a hilly, largely rural area about 175 miles (280 kilometers) west of London.

In Britain’s 2016 referendum, the constituency voted by 52%-48% to leave the EU, which exactly matched the national result. While many farmers back Brexit out of frustration with the EU’s rules-heavy Common Agricultural Policy, sheep farmers in Brecon worry that, without an EU divorce deal, steep tariffs on lamb exports will devastate their business.

The result reflects the seismic effect the U.K.’s decision three years ago to leave the 28-nation EU has had on the country’s politics, with voters increasingly split into pro-Brexit and pro-EU camps. The pro-EU Liberal Democrats have seen their support surge because of their call for the U.K. to remain in the bloc. In European Parliament elections in May, the party took 20% of U.K. votes, trouncing both the Conservatives and the main opposition Labour Party, whose leadership is divided over Brexit.

The Conservatives, meanwhile, are losing support to the Brexit Party led by longtime euroskeptic figurehead Nigel Farage, which took 10% of the votes in Brecon.

For the Brecon by-election, the Lib Dems made a pact with two other pro-EU parties, which did not run to give Dodds a better chance. The country’s main opposition Labour Party, whose leadership is divided over Brexit, saw voters desert it and won just 5% of the votes.

The Conservatives lack an overall majority in the House of Commons, and rely on an alliance with 10 lawmakers from Northern Ireland’s Democratic Unionist Party. The loss of the Brecon seat leaves the governing alliance with 320 of the 639 voting lawmakers — the bare minimum needed to carry votes.

That means Johnson’s government may struggle to pass any legislation and is vulnerable to an opposition no-confidence vote that could trigger an early general election.

Johnson became prime minister last week after winning a Conservative leadership race by vowing to take Britain out of the EU on Oct. 31, with or without a divorce deal.

His hard-line stance is both risky and divisive. Johnson says he wants a Brexit deal, but is demanding the EU make major changes to the divorce agreement it struck with May, which was rejected three times by Britain’s Parliament. The EU is adamant that it won’t renegotiate.

Most economists say leaving the EU without a deal would severely disrupt trade and plunge the U.K. into recession. Bank of England Gov. Mark Carney said a no-deal Brexit would deliver an “instantaneous shock” to the economy in which the pound would fall, prices would rise and GDP would slow.

“The economics of no-deal are that the rules of the game for trade — exporting to Europe or importing from Europe — fundamentally change,” Carney told the BBC on Friday.

“There are some very big industries in this country where that which is highly profitable becomes not profitable, becomes uneconomic, and very difficult decisions will need to be taken.”

___

Follow AP’s full coverage of Brexit at:
https://www.apnews.com/Brexit