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

BERLIN — 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 ahead of bilateral talks in Berlin, Merkel indicated that a solution for the contentious Irish border issue might yet be found before the Brexit date of Oct. 31.

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

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 appeared to acknowledge that the "onus is on us" to produce solutions for the Northern Irish border, while welcoming the "blistering timetable of 30 days" Merkel suggested.

"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."

Johnson insisted Monday that the Irish border backstop clause must be scrapped and replaced with "alternative arrangements" to regulate cross-border trade. In the past, border checkpoints between EU member Ireland and U.K. member Northern Ireland have been a flashpoint for sectarian violence.

"I think it's a bit paradoxical that the EU side is talking about us putting up all the barriers. We've made it clear 1,000 times we don't want to see any checks on the Northern Irish frontier at all," Johnson told ITV.

In a letter to Donald Tusk, president of the European Council, Johnson said the Irish backstop was "anti-democratic and inconsistent with the sovereignty of the U.K." because it would impose EU trade rules on Northern Ireland and create a regulatory border between the province and the rest of the U.K.

Johnson said the backstop also threatens the peace process in Northern Ireland because it would give control of large parts of its economic and commercial life to an external body, "weakening the delicate balance" between its rival factions.

Tusk responded with a ringing defense of the backstop.

"Those against the backstop, and not proposing realistic alternatives, in fact support re-establishing a border," Tusk tweeted Tuesday. "Even if they do not admit it."

Former British Prime Minister Theresa May negotiated the withdrawal agreement with the EU, but it was rejected by the U.K. Parliament three times. Johnson replaced May as prime minister last month.

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.

Since taking office, Johnson has said he wants to reach Brexit agreement with the EU but that Britain will leave the bloc on Oct. 31 even without a deal. Holding out the possibility of a no-deal Brexit is the only way to force the EU to negotiate, he says.

"He's (Johnson) saying ... he will negotiate energetically in the pursuit of a deal, he's very happy to sit down and to talk to EU leaders, but he's making clear that the backstop needs to be removed," Robert Jenrick, a British cabinet minister, told the BBC on Wednesday. "That is the only prospect of securing a deal."

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

On Wednesday, Merkel cited the need for a new air traffic agreement between the EU and Britain. She noted that, as a third country, the U.K. can't expect to enjoy the same benefits as an EU member state.

Thomas Matussek, a former German ambassador to the U.K., said Merkel is likely to offer concessions on the political declaration, but she can't compromise on the "four freedoms" that underpin EU institutions: the free movement of people, goods, services and capital.

The backstop is designed to protect the integrity of the European single market while ensuring that there is no hard border between Northern Ireland and Ireland.

"We cannot throw Ireland under the bus," Matussek told the BBC. "What message would that send to other members of the EU family if we gave up that sort of loyalty and solidarity?"