BERLIN (AP) — German Chancellor Angela Merkel raised the possibility that a negotiated departure for Britain from the European Union might still be possible even as the clock is ticking on a deal that would satisfy both sides.

Speaking Wednesday alongside U.K. Prime Minister Boris Johnson before the two leaders held bilateral talks in Berlin, Merkel indicated that a solution for the contentious Irish border issue might yet be reached before the Brexit date of Oct. 31.

"(We) might be able to find it in the next 30 days, why not?" Merkel told reporters.

Her comments marked a departure from the pessimism that's prevailed on both sides of the English Channel in recent months. The EU has ruled out renegotiating the Brexit agreement hammered out with Britain last year. Johnson, for his part, says he will take Britain out of the bloc at the end of October without a deal unless the EU scraps the contentious backstop clause designed to prevent customs checkpoints along the Irish border.

Johnson, on his first visit to Germany since becoming prime minister last month, welcomed the "blistering timetable of 30 days" Merkel suggested, but appeared to acknowledge that the ball is now in Britain's court to avert an economically devastating no-deal Brexit by proposing a viable solution to the Irish border issue.

"There are abundant solutions which are proffered, which have already been discussed," Johnson said, without elaborating. "I don't think, to be fair, they have so far been very actively proposed over the last three years by the British government."

"You rightly say the onus is on us to produce those solutions, those ideas, to show how we can address the issue of the Northern Irish border and that is what we want to do," he said.

Johnson had insisted Monday that the Irish border backstop clause must be scrapped and replaced with "alternative arrangements" to regulate cross-border trade.

The EU says the backstop is merely an insurance policy meant to avoid checkpoints between Ireland and Northern Ireland, which were a flashpoint for sectarian violence in the past, and won't be needed if other solutions are found for goods moving across the border.

The backstop was part of the withdrawal agreement former British Prime Minister Theresa May negotiated with the EU, but it was rejected by the U.K. Parliament three times.

Johnson's stance, that Britain will leave the EU with or without a deal, has alienated many in Europe.

The EU's agriculture chief warned that if Britain crashes out without a deal on Oct. 31, it would create a "foul atmosphere" that would spill over into any negotiations on a future trade deal between the two sides.

Speaking in his native Ireland, EU Farm Commission Phil Hogan said the remaining 27 countries would " hold the line" and had made "detailed contingency plans for every outcome," echoing the view of many on the continent that a no-deal Brexit is now the most likely outcome.

"Contrary to what the UK government may wish, the EU will not buckle," he insisted.

German President Frank-Walter Steinmeier went so far Wednesday as to question whether Johnson was serious about seeking new Brexit talks or whether he was planning to blame the EU if they failed.

Yet Johnson appeared emboldened Wednesday as he and Merkel faced reporters before holding talks over dinner — where tuna tartare, saddle of venison and chocolate tarte were on the menu.

"We seek a deal. And I believe that we can get one," he said, before quoting one of Merkel's trademark phrases — "we can do it" — which the German chancellor repeatedly used when insisting that her country could cope with the migrant influx of 2015-2016.

After meeting with Merkel, Johnson goes to Paris on Thursday for talks with French President Emmanuel Macron, then on to a three-day summit of G-7 leaders, including U.S. President Donald Trump, which begins Saturday in Biarritz, France.

The withdrawal agreement is just the first step in Britain's exit from the EU and will be followed by negotiations on future relations likely lasting years.

Merkel on Wednesday cited the need for a new air traffic agreement between the EU and Britain as one example of the kind of deal that still needs to be agreed, noting that as a third country, the U.K. can't expect to enjoy the same benefits as an EU member state.

___

Danica Kirka in London, Sylvie Corbet in Paris and Kirsten Grieshaber in Berlin contributed to this report.