British and European Union negotiators expressed cautious optimism Tuesday that they would reach a deal to prevent a disorderly U.K. exit from the bloc, saying talks will be intensified and take place "continuously" over the next few crucial months.

After meeting U.K. Brexit Secretary Dominic Raab in Brussels, chief EU negotiator Michel Barnier said differences remained between the two sides on future economic relations and maintaining an open border between EU member Ireland and the U.K.'s Northern Ireland.

Barnier said the challenge "for the coming weeks is to try and define an ambitious partnership between the U.K. and the EU, a partnership that has no precedent."

Raab said there were "significant" issues to overcome, but that if both sides showed ambition and pragmatism, an agreement could be reached by October.

That's the deadline the two sides have set themselves for a deal on divorce terms and the outlines of future trade, so that it can be approved by individual EU countries before Brexit day on March 29.

But negotiations have got bogged down amid infighting within British Prime Minister Theresa May's divided Conservative government about how close an economic relationship to seek with the EU after Brexit.

UK EU Brexit Negotiations
Britain's Secretary of State for Exiting the European Union, Dominic Raab and European Union's chief Brexit negotiator, Michel Barnier, brief the media after a meeting at the EU Commission headquarters in Brussels, Belgium August 21, 2018. REUTERS/Francois Lenoir

Last month the government finally produced a plan, proposing to stick close to EU regulations in return for free trade in goods and no customs checks on the Irish border. But to some EU officials that smacks of cherry-picking benefits of EU membership without the responsibilities — something the bloc has explicitly ruled out.

Last week Latvian Foreign Minister Edgars Rinkevics put the chances of getting a Brexit deal at 50-50.

British businesses have warned that leaving without a deal could cause mayhem for trade and travel, bringing higher food prices, logjams around U.K. ports and disruption to everything from aviation to medical supplies.

A group that represents U.K. hospitals and ambulance services has said that its members may run out of drugs if Britain leaves the European Union without an agreement on future relations.

In a letter published Tuesday, NHS Providers said a lack of "visible and appropriate communication" from the government is hampering preparations for a so-called no-deal Brexit.

In a letter to National Health Service bosses that was leaked to the Times of London, the group's chief executive said it would be more efficient to develop contingency plans nationally rather than "have to reinvent the wheel 229 times."

Chris Hopson said "the entire supply chain of pharmaceuticals" could be affected by the failure to reach a deal, adding that it could also "jeopardize" the EU workforce "on which the NHS relies."

The U.K. government says it remains confident of reaching a deal, but is preparing for all outcomes. Foreign Secretary Jeremy Hunt said Tuesday that the chance of no deal was "not negligible," and that outcome would be bad both for Britain and for the EU.

On Thursday, the U.K. government plans to publish the first in a series of technical reports outlining the effects a no-deal Brexit would have on various sectors and offering advice to businesses and the public on how to prepare.