Germany and France have signalled their willingness to delay Brexit as Michel Barnier offered to renegotiate with Theresa May in the event that she is able to build a majority with Labour in favour of a closer relationship with the EU.

EU ambassadors also discussed the issue for the first time at a meeting in Brussels on Tuesday, as the member states attempted to decide on their terms for extending the negotiating time beyond 29 March.

With Downing Street opening cross-party talks after the government’s historic defeat, EU politicians and officials were looking ahead in case the prime minister finds a majority in the Commons for a fresh approach.

On Tuesday night, Emmanuel Macron, coming to the end of a seven-hour town hall meeting as news of May’s Brexit vote defeat came through, said he believed the British government would seek an extension to article 50 in order to renegotiate the deal before a second parliamentary vote. “I think that’s what they’ll do. I know them a bit,” said the French president. “In that case, we’ll look into it, and maybe we’ll make improvements on one or two things.”

However, he cautioned: “We’ve reached the maximum for what we can do with the deal.” He warned that the EU would not stop defending European interests “just to solve Britain’s domestic political issues”.

He added that the whole basis for Brexit was flawed: “It’s a referendum that has been manipulated, manipulated from outside by a lot of what we call fake news.”

Peter Altmaier, Germany’s economics minister, suggested he would see it “as a reasonable request” if the UK wanted an extension. Nathalie Loiseau, France’s EU affairs minister, confirmed that a delay would be possible in the right context.

A similar argument was made by Barnier, the EU’s chief negotiator, during a late-night private meeting with senior members of the European parliament in the hours immediately after the Commons vote. The EU has previously suggested that only a general election or second referendum could persuade them to delay Brexit.

What are the alternatives to May's rejected Brexit deal? Read more

On Wednesday, Macron became the first EU leader to publicly raise the prospect of an extension beyond European elections in May. “Maybe they will step over the European elections in order to find [negotiate] something else,” Macron said, comments that represent a subtle shift in tone, as France has long insisted that there could be no prolongation of article 50 beyond the elections.

During Wednesday’s meeting of ambassadors and senior EU officials, several member states raised the issue of extending the two years allowed under article 50 for withdrawal talks.

It is hoped that May might be able to construct a cross-party position to avoid a no-deal Brexit. Labour has said that it would support a deal involving a permanent customs union, a position that the prime minister nevertheless reiterated her opposition to on Wednesday.

Speaking to a full chamber of the European parliament in Strasbourg on Wednesday, Barnier said the motivations of the MPs who delivered the rebuff to May – a defeat by 230 votes, the largest ever for a sitting government – were “contradictory”.

He said the Commons had failed to offer an alternative vision, and warned May that no progress could be made until she found a majority for a deal. “Objectively speaking, this vote is not a clear manifestation of a positive majority which would define an alternative project, and an alternative to the proposal on the table today,” Barnier said.

“So, in this context, it is up to the British authorities today or tomorrow to assess the outcome of this vote, and up to the British government to find how we are to take things forward on 29 March towards an orderly withdrawal.”

Barnier, whose speech was applauded by MEPs despite the problems being faced in ratifying the deal he brokered, told the parliament that he would not speculate on the “scenarios” opening up following the rejection of the deal. “Now, with this standstill, until we have found a way forward which will see a full majority we won’t be able to move forward, so this is why the future steps must be indicated very clearly … by the British government,” he said.

But the former French minister added: “I would like to remind you that your parliament, and unanimously the European council, have always said that if the UK chooses to shift its red lines in the future, and it makes that choice, a choice to be ambitious, and go beyond a simple free trade agreement, which would be quite something, then the European Union will be immediately ready to go hand in hand with that development and to give a favourable response.”

The German chancellor, Angela Merkel, said on Tuesday that there would be time to negotiate, but that it was “up to the British side, as the prime minister has announced, to tell us what happens next”.

The EU is willing to reopen the political declaration on the future relationship, a 26-page document that is not legally binding, but remains highly resistant to any suggestion of unpicking the 585-page withdrawal agreement.

Barnier told MEPs that whatever emerged from future talks, the withdrawal agreement would still need to contain the contentious Irish backstop for avoiding a hard border, which Brexiters fear will trap the UK in a customs union.

Philippe Lamberts, the leader of the Greens in the European parliament, said the withdrawal agreement containing the backstop would likely be received by rapporteurs, the MEPs who would present the draft to the chamber, next week as the EU continued on with its ratification process. “The withdrawal agreement will not be reopened because whatever deal we have, we need that”, he said.

Critics of May’s deal have called for a time limit or unilateral right to exit the arrangements. Barnier told MEPs: “The backstop that we agreed with the UK must remain a backstop, must remain a credible backstop. The backstop must remain a backstop.”

How did your MP vote on May's Brexit deal? Read more

While EU officials once ruled out the UK remaining in the EU beyond elections in May 2019, attention is turning to legal fixes to permit an extension if Brexit talks drag on through the summer.

One idea is writing text into the 585-page withdrawal agreement that would allow British representatives to sit in the parliament Brussels and Strasbourg temporarily. The model would be a reverse copy of arrangements for countries joining the EU, when national parliaments send delegates to the European parliament if they join halfway through a term.

But not everyone agrees with this analysis. “The logical consequences of an extension is that they will have to participate in European elections,” the senior official said. EU lawyers have yet to express a view.

• This article was amended on 17 January 2019 to correct Peter Altmaier’s position from finance minister to economics minister.