Senior Tory and Labour MPs are planning to force the government to delay Brexit by several months to avoid a no-deal outcome if Theresa May fails to get her deal through parliament in January, the Observer has been told.

Cross-party talks have been under way for several weeks to ensure the 29 March date is put back – probably until July at the latest – if the government does not push for a delay itself. It is also understood that cabinet ministers have discussed the option of a delay with senior backbench MPs in both the main parties and that Downing Street is considering scenarios in which a delay might have to be requested from Brussels.

One senior Tory backbencher said: “I have had these discussions with ministers. They will not say so in public but of course the option of a delay has to be looked at in detail now. If we are determined to avoid a no deal, and the prime minister’s deal fails, we will have to ask to stop the clock, and that will give time for us to decide to go whatever way we decide thereafter.”

The Conservative MP and former attorney general Dominic Grieve said he believed that even if May got her deal through, there would probably be insufficient time to push all the necessary legislation through parliament to allow Brexit to happen smoothly and that a delay might well be necessary. But if her deal were voted down, the need to take up the option of a delay would become a “certainty”. He said: “I think that if she does not get her deal passed, a delay would be inevitable to give more time to avoid a no deal, and also there is the possibility that there would be a referendum, so this would allow for that.”

Labour’s Brexit spokesman Keir Starmer said that parliament would need to discuss all options, including a possible delay, if and when May failed to get her blueprint through the Commons. “If the prime minister’s deal is voted down in early January, then we will be just nine weeks away from the date we are due to leave the EU,” Starmer said.

“If the deal is rejected, parliament will need to have a very serious debate about how to protect the economy from a no-deal scenario and at this stage nothing should be ruled out.”

Shadow Brexit secretary Keir Starmer. Photograph: Dan Kitwood/Getty Images

Any attempt to push back Brexit would anger hardline Brexiters in the European Research Group, led by Jacob Rees-Mogg. But most MPs think it would be supported by a majority in parliament to avoid a cliff-edge exit.

In the week before Christmas Starmer told the Commons: “I do agree that serious consideration needs to be given to the timetable now set by article 50, because by 14 January we will be just nine weeks away from the proposed date of leaving the EU. On any view, the government will then have to make a choice about what to do next. No plan B has ever been forthcoming.”

He added in the same debate that he had talked to senior figures in the EU, saying: “I have had a number of discussions about the issue of extension with the [European] commission, the council and various EU countries. The clear message from them is that the only basis for an extension would be if it was coupled with a good reason for the extension. That is why we need to get on to the debate about what happens if and when this deal is voted down.”

Brussels has made clear that it would consider putting back the date of Brexit for a good reason, but has stressed that this could not mean reopening negotiations. The EU would be willing to allow extra time for a second referendum to take place.

Cross-party groups of MPs have been considering how to force a delay, if the government does not decide to ask for one itself. One idea is that it could be done by tabling an amendment to a Brexit-related motion that would be put forward by ministers if no deal were agreed by 21 January.

The Labour MP Chuka Umunna, who is campaigning for a second referendum said: “The stark reality is that the principal way of stopping no deal – which is a distinct possibility – is by getting an extension of the article 50 process. The EU is clear – they will grant an extension to allow for a people’s vote, not for further negotiation, so committing to a people’s vote is the way to stop no deal.”

Labour is not, yet, officially calling for a delay but is biding its time to see what happens when parliament returns in the second week in January.

Meanwhile figures have emerged showing the government has spent more than £4m on consultants to help prepare for leaving the bloc. This includes almost £1.5m on Boston Consulting Group, which in 2016 warned that “a protracted period of uncertainty and volatility seems very likely on many dimensions, including on growth, trade, investment, interest rates, and financial markets”.

Susan Elan Jones, a Labour MP and people’s vote supporter, said: “The only people who benefit from the government’s Brexit plan are management consultants and accountants. It’s a bad deal for Britain and a much worse deal than we’ve already got in the EU.”

In an interview with the Sunday Times, the trade minister, Liam Fox, put the chances of Brexit being cancelled altogether at about “50-50” if parliament votes down Theresa May’s deal. “If we were not to vote for that, I’m not sure I would give it [Brexit] much more than 50-50,” Fox, a leading supporter of leaving the EU, told the newspaper.

In the German newspaper Welt am Sonntag, Jean-Claude Juncker has called on the United Kingdom to “get your act together” over Brexit, branding it “entirely unreasonable” to expect Brussels to put forward a solution. The European commission president rejected claims of a plot to keep the UK in the EU.

Juncker said it was up to the British to decide if the final decision is put back to the people in a second referendum or so-called People’s Vote. However he said he was “working on the assumption that [the UK] will leave, because that is what the people of the United Kingdom have decided”.