UK Prime Minister Boris Johnson and his Irish counterpart, Leo Varadkar, agreed Thursday that they could see the "pathway to a deal" on Brexit after a lengthy meeting.

The focus now shifts to Brexit Secretary Steve Barclay, who is meeting in Brussels with the EU's chief Brexit negotiator, Michel Barnier, for further talks.

Thursday's meeting marked a dramatic, positive shift in tone after talks appeared close to collapse.

The two sides remain far apart in their demands, however, and it is unclear whether any deal Johnson strikes would have the support of Parliament.

LONDON — The European Union has welcomed "promising" signs that a new Brexit deal could be negotiated after UK Prime Minister Boris Johnson emerged from last-ditch Brexit talks with the Irish premier, Leo Varadkar, on Thursday night insisting they could see the "pathway to a deal."

In a strikingly optimistic statement after three hours of talks between the two leaders, during which they talked mostly without aides, Varadkar said it was possible for Johnson to secure a Brexit deal before Britain's Brexit deadline of October 31.

The Irish premier refused to give details of what proposals had been discussed but said: "I had a very good meeting today with the prime minister and our teams together — very positive and very promising."

"I am now absolutely convinced that both Ireland and Britain want there to be an agreement that's in the interests of Ireland, the UK, and EU as a whole," he added.

"And I do see a pathway towards an agreement in the coming weeks."

Johnson did not make a public comment after the meeting in an apparent attempt to rebuild trust between the leaders, which has soured in recent weeks, and avoid derailing any breakthroughs, but Downing Street echoed Varadkar's claim that the leaders had identified the "pathway to a deal."

The pound rose 2% against the dollar to $1.246 on the news as the focus shifted to Brussels, where Brexit Secretary Steve Barclay arrived for discussions with Michel Barnier, the EU's chief Brexit negotiator.

Barnier's comments after the meeting will be the crucial indication of whether any progress made in Thursday's bilateral meeting will be enough to resume talks that appeared close to collapse.

The European Commission's president, Donald Tusk, signaled that the EU could be open to further talks Friday but downplayed talks of major progress from the UK side.

"The UK has still not come forward with a workable, realistic proposal," he tweeted.

"But I have received promising signals from Taoiseach Leo Varadkar that a deal is possible. Even the slightest chance must be used. A no deal Brexit will never be the choice of the EU."

Will there be a Brexit deal?

Varadkar and Johnson on Thursday. Noel Mullen via Reuters

While some progress does appear to have been made at the meeting, the EU remains far apart from the UK's position, with customs proposals by far the biggest sticking point.

Johnson called last week for the Irish backstop to be replaced with a plan that would see Northern Ireland remain in the European single market for goods but leave the customs union along with the rest of the UK.

But Brussels has said it will not accept the proposal on the grounds that it would require customs checks on the island of Ireland, which it says would threaten the Irish peace settlement.

Varadkar's words Thursday indicated that Johnson might have shifted his red lines and could now be willing to keep Northern Ireland in the customs union.

But any concession that would keep Northern Ireland in the customs union would cause a political storm within the Conservative Party, and it is unclear whether there would be a majority in Parliament for such a deal.