British Prime Minister Boris Johnson and his Irish counterpart Leo Varadkar said on Thursday that a Brexit deal remains possible.
In a joint statement, Johnson and Varadkar said they had a " detailed and constructive discussion."
"Both continue to believe that a deal is in everybody's interest. They agreed that they could see a pathway to a possible deal."
The statement followed talks in northwest England which both leaders sought to roll the dice one last time in the hope of breaking the Brexit deadlock.
It will be followed by a meeting on Friday between the UK's Brexit minister Stephen Barclay and the EU's chief negotiator Michel Barnier.
"I had a very good meeting with the prime minister... very positive and very promising," Varadkar told Irish reporters. "I do see a pathway to an agreement in coming weeks."
"I think it is possible for us to come to an agreement, to have a treaty agreed, to allow the UK to leave the EU in an orderly fashion and to have that done by the end of October but there's many a slip between cup and lip and lots of things that are not in my control," he said.
The British minister Michael Gove said that the conversation between PM Johnson and Taoiseach Varadkar had been "cordial and constructive" and that "good progress" had been made.
However, Ireland's foreign minister Simon Coveney said there was still some way to go before the UK and the EU had got an agreement.
"Mark my words: we are not there yet," Coveney said in a speech in Dublin before meeting Irish Prime Minister Leo Varadkar on his return from the talks with Johnson.
"Today, I think, is an injection of some much-needed optimism but the pragmatism of getting a deal across the line is what we will need to focus on in the weeks and days ahead," Coveney said.
'A real turn of mood from the Irish Taoiseach':see Euronews' Brussels correspondent Jack Parrock's analysis in the video player above.
The meeting between Johnson and Varadkar came three weeks to the day before the UK is due to leave the EU. It followed a phone conversation between the two leaders earlier this week.
It does represent a change of mood between the two sides, compared to earlier in the week. However, the tight timetable in the run-up to October 31 means the chances of a fully ratified deal are minimal.
Earlier on Thursday, French President Emmanuel Macron said the onus was on the UK to change its stance.
"If they want to make a move which is compatible with what could be accepted by the (EU) 27, it is fine," he said, speaking in English at an event in Lyon. "If they don't want to make any move or make something which is not accepted, they will have to take the responsibility."
Ahead of the meeting, neither side was playing up expectations of a breakthrough. Varadkar said achieving a deal would be “extremely difficult”. Johnson’s stance appeared more positive: the prime minister tweeted to say he was “still cautiously, cautiously optimistic”.
Without knowing the details of what emerged, there is a yawning gulf between the British government’s official position, and that of Ireland and the EU. Talks in Brussels all but broke down this week amid a bout of acrimony.
The Irish prime minister told parliament in Dublin his government had “grave difficulty” with the UK’s plan to pull Northern Ireland out of the EU’s customs union without the consent of its people – a majority of whom opposed Brexit in the 2016 referendum.
Under Boris Johnson’s plan for a revised divorce deal, the “backstop” – which would keep the UK in a customs union with the EU – would be scrapped. Instead, the whole of the UK – including Northern Ireland – would leave.
Dublin and the EU27 oppose customs checks anywhere on the island of Ireland. They say the UK’s proposals for an automated system are unproven and cannot provide a cast-iron guarantee for an open border in the same way as the backstop.
The British want the EU to compromise over customs, arguing that they have given ground in accepting that Northern Ireland would remain under single market rules for goods and agri-food products.
But Dublin, with EU backing, opposes the UK’s plan whereby the arrangement would be subject to approval every four years from Northern Ireland’s elected authorities. Many among the business and farming communities in the North have also castigated Johnson’s plan as unworkable and damaging.
Johnson and Varadkar's joint statement comes a week before a European Council summit when any deal would need to be signed off by EU27 leaders.
The British government continues to insist the UK will leave the EU on October 31. The British parliament – which has passed a law designed to force another delay in the absence of a deal – will hold an emergency session on October 19, its first Saturday sitting since 1982.