Last-ditch efforts by Theresa May and Jeremy Corbyn to strike a compromise on Brexit looked doomed on Saturday as the party leaders faced mounting revolts from their own MPs and activists.

Following Thursday’s local elections, in which both the Conservatives and Labour were punished severely by voters for failing to break the political deadlock, May and Corbyn have insisted their parties must now urgently agree a way forward in cross-party talks which will resume on Tuesday. On Saturday the prime minister reiterated her appeal, saying: “We have to find a way to break the deadlock. I believe the results of the local elections give fresh urgency to this.”

But opposition MPs and Tory Brexiters warned any deal the leadership teams stitch up behind the scenes would face inevitable defeat in parliament and cause more acrimony in the parties.

The Observer can reveal that 104 opposition MPs, mainly from Labour but also SNP, Change UK, Green and Plaid Cymru, have written to May and Corbyn insisting they will not back a “Westminster stitch-up” unless there is a firm guarantee that any deal is then put to a confirmatory referendum.

The MPs say: “The very worst thing we could do at this time is a Westminster stitch-up whether over the PM’s deal or another deal. This risks alienating both those who voted leave in 2016 and those who voted remain.” They say that, “whatever the deal” is, it must be the subject of another referendum so voters can have the “final say”.

Separately, senior Tory MPs insisted that any deal struck with Labour that involved anything close to a customs union – Corbyn’s central demand in the talks – would be rejected by more than 100 of the party’s MPs, who would see it as a betrayal of May’s promises on Brexit.

Nigel Evans, executive secretary of the 1922 Committee of Tory backbenchers, said: “If there is a compromise that turns out to be a kind of ‘Brexit in name only’ involving anything close to a customs union there would be more than 100 Tory MPs who would never support it, particularly following the local elections.”

Another member of the 1922 executive said that, even if a cross-party deal were struck that could command the support of two-thirds of Labour MPs, it would then be likely to be opposed by two-thirds of Tory backbenchers.

As both parties continue to digest the local election results, which saw the Tories lose around 1,300 seats in their worst result since the 1990s and Labour shed more than 60, anger at the leaders’ handling of Brexit intensified among MPs and members.

Alanna Vine, chair of Cheadle Conservative Association, said: “Our party’s failure to deliver Brexit has been toxic. If we don’t change course – immediately cease discussions with Corbyn about us remaining in the EU customs union and stop endlessly extending our leaving date – our party will be wiped out for a generation.”

Alexander Curtis, chair of Hertford and Stortford Conservative Association, said: “Colleagues have paid dearly for our prime minister’s failure to believe in and back the decision of 17.4 million voters to leave the EU. People are sick of our incompetence and inability to deliver and to honour our promises. We will be annihilated in the Euro elections if we break another promise and adopt Corbyn’s customs union plan.”

Writing for the Guardian, Bridget Phillipson, Labour MP for Sunderland South, said her party’s loss of councillors was not the result of leave voters deserting but that the area’s remain supporters “gave us a bloody nose and showed us their support is not unconditional”. She adds: “It should be a source of shame to us all that Labour’s position on the most urgent challenge our country faces has been to wallow in fudge for three long years.”

In the Observer, the Lib Dem leader, Vince Cable, whose party made strong gains, along with the Greens, on Thursday, suggests that if pro-remain parties are to stop Brexit they need to look at ways to work together after the European elections on 23 May. Cable says: “Once the immediate bunfight for votes is over, liberals and social democrats in all the parties need to look afresh at how we make an impact when a general election finally comes. Millions of voters are politically homeless and looking for a voice.”

In Saturday night’s statement May said: “We will keep negotiating and keep trying to find a way through. Because the real thing that matters now is delivering Brexit and moving on to all the other issues people care about. The longer that takes, the greater the risk we will not leave at all. We need to get out of the EU and get a deal over the line.”

On Saturday, the health secretary, Matt Hancock, suggested the government could reach a compromise with Labour on a post-Brexit customs union arrangement with the EU.

He said the local election results on Thursday were a call from voters to “deliver Brexit and then move on”.