Ireland's Taoiseach Leo Varadkar speaks to the media following private talks with Britain's Prime Minister Boris Johnson, at Liverpool Airport, England, Thursday, Oct. 10, 2019. The leaders of Britain and Ireland said they spotted a

LONDON (AP) — The leaders of Britain and Ireland said Thursday they had spotted a "pathway" to an elusive Brexit deal, keeping hopes of a breakthrough alive just three weeks before the U.K.'s deadline to leave the European Union.

British Prime Minister Boris Johnson and Irish leader Leo Varadkar provided a status update on the issue after a private lunch meeting in northwest England that lasted for several hours.

"Both continue to believe that a deal is in everybody's interest," they said in a joint statement. "They agreed that they could see a pathway to a possible deal."

Britain is due to leave the 28-nation bloc on Oct. 31, and attempts to find a deal have foundered over plans for the border between EU member Ireland and the U.K.'s Northern Ireland.

The currently all-but-invisible border underpins both the regional economy and Northern Ireland's peace process.

Under a U.K. proposal, there would have to be customs checks on some goods, though not on the border itself. The EU says any customs checks are unacceptable.

There was little of substance in Varadkar and Johnson's statement indicating a breakthrough or whether the "pathway" was near or far off.

The two agreed to "reflect" further on their discussions, which concentrated on the challenges of customs and consent. They also agreed to keep talking.

After the meeting, Varadkar sounded more positive than he has in recent weeks.

"I think it is possible for us to come to an agreement, to have a treaty to allow the U.K. to leave the EU in an orderly fashion, and to have that done by the end of October," he said. But he warned things could still go wrong, and added: "In terms of how long it will take, I can't predict that with any certainty."

In recent days, Britain and the EU have traded bad-tempered barbs about who is responsible for the deadlock in talks.

After Johnson's Downing Street office claimed EU intransigence had made it "essentially impossible" for the U.K. to leave with a deal, European Commission President Donald Tusk warned against playing a "stupid blame game."

Varadkar and other EU leaders say Johnson, who took office in July, has repudiated the withdrawal agreement made with the bloc by his predecessor, Theresa May. That deal was rejected three times by Britain's Parliament, largely because of lawmakers' opposition to provisions to ensure an open Irish border.

Johnson insists the U.K. will leave the U.K. on Oct. 31, with or without a divorce deal.

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 — the day after a key summit of EU leaders in Brussels.

Johnson says he won't delay Brexit past Oct. 31 — but also will obey the law. It's unclear how the two statements can be reconciled.

Parliament is expected to hold a rare Saturday sitting on Oct. 19 as lawmakers grapple with what to do next.

___

Danica Kirka in London contributed.

___

Follow AP's full coverage of Brexit and British politics at https://www.apnews.com/Brexit

Britain's Prime Minister Boris Johnson looks up from the doorstep of 10 Downing Street in London, Thursday, Oct. 10, 2019. Johnson was meeting mental health campaigners, whose badge he wears and later Thursday he is scheduled to meet with Irish Prime Minister Leo Varadkar for talks on Brexit. (AP Photo/Alastair Grant)
European Union flags flap in the wind at EU headquarters in Brussels, Wednesday, Oct. 9, 2019. Irish Prime Minister Leo Varadkar said that big gaps remain between Britain and the European Union as they try to secure a Brexit deal by next week.(AP Photo/Virginia Mayo)
A construction worker stands in front of a door with the EU stars at EU headquarters in Brussels, Wednesday, Oct. 9, 2019. Irish Prime Minister Leo Varadkar said that big gaps remain between Britain and the European Union as they try to secure a Brexit deal by next week.(AP Photo/Virginia Mayo)
Britain's Prime Minister Boris Johnson waves to the media from the doorstep of 10 Downing Street in London, Thursday, Oct. 10, 2019, ahead of meeting mental health campaigners. (AP Photo/Alastair Grant)
Ireland's Taoiseach Leo Varadkar speaks to the media following private talks with Britain's Prime Minister Boris Johnson, at Liverpool Airport, England, Thursday, Oct. 10, 2019. The leaders of Britain and Ireland said they spotted a
A police officer talks to anti-Brexit protesters outside the entrance to Thornton Manor, in The Wirral, England, Thursday Oct. 10, 2019. Britain's Prime Minister Boris Johnson and Irish couterpart Leo Varadkar are meeting at Thornton Manor Thursday in a bid to break the Brexit deadlock. (Danny Lawson/PA via AP)
Britain's Prime Minister Boris Johnson looks up from the doorstep of 10 Downing Street in London, Thursday, Oct. 10, 2019. Johnson was meeting mental health campaigners, whose badge he wears and later Thursday he is scheduled to meet with Irish Prime Minister Leo Varadkar for talks on Brexit. (AP Photo/Alastair Grant)