BRUSSELS -- Despite having only days to bridge wide divisions over Brexit, the European Union maintained a semblance of hope Wednesday that the acrimonious fight over Britain's departure from the bloc could somehow still be settled amicably.

Across the European Parliament, voices resonated with frustration that one of the most important events for both the EU and the U.K. in decades had turned into a tone-deaf dialogue only three weeks ahead of Britain's planned Oct. 31 departure.

EU Commission President Jean-Claude Juncker said he was working together with EU Brexit negotiator Michel Barnier on a last-gasp solution.

"Personally, I don't exclude a deal. Michel and myself are working on a deal," Juncker said.

He refused to be more specific but made clear that Brexit talks between the two sides haven't come to an irreparable standstill.

British Prime Minister Boris Johnson has vowed to take his country out of the EU on Oct. 31 with or without a divorce deal. If Britain does leave, it will be the first EU nation to exit the bloc, ending almost half a century of U.K. membership that brought economic and diplomatic clout to both sides.

For now, Juncker insisted Johnson needed to stop pouring all the blame on the EU for the negotiating standstill. On Tuesday, Johnson's Downing Street office claimed EU intransigence had made it "essentially impossible" for the UK to leave with a deal.

"We are not accepting this blame game that started in London," Juncker said.

Johnson, who took office in July after British lawmakers rejected the Brexit deal of his predecessor Theresa May three times, delivered his own Brexit proposals to the bloc last week.

Britain is seeking to renegotiate May's rejected divorce deal to loosen the economic ties binding the U.K. to the bloc while ensuring there is no hard border between EU member Ireland and the U.K.'s Northern Ireland.

Barnier said the U.K.'s ideas were fundamentally flawed because they would mean imposing customs checks on the island of Ireland, and because they gave Northern Ireland's regional authority a veto on how to proceed.

"The proposal of the British government as things stand is not something we can accept," he said.

Johnson's proposals crossed so many of the EU's red lines, Barnier said, that he would need to fundamentally revamp his proposals -- something the British leader has said he will not do.

Irish Prime Minister Leo Varadkar said Ireland wanted a Brexit deal but "not at any cost."

"It's going to be very difficult to secure an agreement by next week, quite frankly," Varadkar told Irish broadcaster RTE late Tuesday after a 40-minute phone call with Johnson.

"Essentially what the United Kingdom has done is repudiate the deal that we negotiated in good faith with Prime Minister (Theresa) May's government over two years and have sort of put half of that now back on the table and are saying, 'That's a concession.' And, of course, it isn't really," said the Irish leader.

The British government says it still hopes to strike a deal. Johnson and Varadkar are due to hold a private lunch in northwest England on Thursday, while U.K. Brexit Secretary Stephen Barclay is scheduled to meet Barnier on Friday.

But Johnson also insists the U.K. will leave the U.K. on Oct. 31, come what may.

However, many members of Britain's Parliament are determined to prevent a no-deal Brexit, which economists say would plunge the U.K. economy into recession. Last month they passed a law requiring the government to ask the EU for a delay if no divorce deal has been agreed by Oct. 19.

Anti-Brexit activists fear Johnson will try to wriggle out of that requirement, and asked Scotland's highest court to order the government to comply. Judges at the Court of Session in Edinburgh said Wednesday there was no need to make a ruling yet because the government had promised to obey the law. They said they would revisit the decision if Johnson did not ask for the extension.

Elaine Motion, a lawyer for the claimants, said "the sword of Damocles is over the prime minister's head" and he would have to seek a delay to Brexit.

------

Lawless reported from London

------

This story has been corrected to show that the Irish prime minister's last name is Varadkar, not Varadkhar