Frantic negotiations to prevent a damaging government defeat over parliament’s ability to block a no-deal Brexit look set to come down to the wire, with rebels and government whips locked in deep discussions hours before the vote.

The mood appeared to shift against the government over the course of the afternoon. The justice minister Philip Lee resigned on the morning of the vote and suggested he would rebel against the government.

Justine Greening, a former education secretary, suggested she would back the amendment, telling the Commons it was “sensible to have a structured process to deal with the different scenarios this House may face”.

Most of the original 11 rebels on the meaningful vote amendment, led by the former attorney general Dominic Grieve, the former attorney general, have also indicated that they will stand firm. One told the Guardian that at least a couple more MPs were considering joining the rebel alliance.

Opening the debate in parliament, the Brexit secretary, David Davis, said the government could not accept anything that could undermine Theresa May, hinting that the provisions in amendments proposed by Lords and Tory rebels would hamper negotiations.

“We have listened wherever possible to sensible suggestions that have been made to improve the bill,” he said. “But where amendments have been made that seek to or inadvertently undermine the essential purpose of the bill to provide a smooth and orderly exit, or undermine the referendum result, we must reject them.”

Downing Street had said it would not accept a compromise amendment offered by Grieve, which gave more flexibility than the Lords amendment. However, in a sign the government saw the prospect of defeat looming, solicitor general Robert Buckland intervened from the front bench saying there was “much merit’ to parts of the compromise amendment and asked for more time to meet Grieve to discuss it, offering to use it as the basis of “a structured discussion ahead of the Lords stages” in exchange for support for the government on Tuesday.

Grieve, the former attorney general who has been a leading figure in the Conservative rebellion, suggested that would not be enough to prevent a rebellion.

Lee dealt a significant blow to the prime minister by resigning over the government’s handling of Brexit, which he said was detrimental to the lives of his constituents.

His departure will increase the number of rebels planning to oppose the government on the key amendment to the bill, and could also encourage wavering backbenchers to join him.

The Tory MP, who supported remain at the referendum, said: “If in the future I am to look my children in the eye and honestly say that I did my best for them, I cannot in all good conscience support how our country’s exit from the EU looks set to be delivered.”

MPs have said the government could lose the vote unless it offers concessions soon. In December, ministers conceded at the end of the debate, prompting Tory rebels to shout “too late” before the government was defeated.

As the debate opened, the Conservative chief whip, Julian Smith, hurried up and down the green benches of the Commons chamber, speaking urgently to groups of MPs. They included Grieve and another potential rebel, Stephen Hammond, and two more influential pro-Europe Tories, Greening and George Freeman.

Inbetween discussions, Smith spoke to ministers on the front benches, including May, scribbling notes on a Commons paper.

Downing Street has officially ruled out backing Grieve’s 11th-hour amendment, tabled on Monday night, which would give parliament more control over the outcome should MPs vote down May’s final Brexit deal. It is now unlikely to be put to a vote unless No 10 reverses its decision.

The government has offered its own amendment that guarantees only a ministerial statement to parliament within 28 days.

Grieve and other Tory rebels have suggested they could back the Lords amendment, which has a much more expansive role for parliament, if the government does not compromise further.

On Tuesday, Grieve said he accepted that the Lords’ version was “not completely satisfactory” but said the government’s proposal did not go far enough either. “My own amendment is trying to bridge that gap,” he told the BBC. “It doesn’t affect the ability to negotiate a deal at all. It’s making perfectly sensible and reasonable safeguards for what is undoubtedly a highly risky business.”

The cabinet discussed the Brexit bill for around 20 minutes on Tuesday morning, No 10 said. “The prime minister said that the votes were important in terms of the message which they sent to Brussels. She said that anything which undermines the government at home would make negotiations with the EU more difficult,” the prime minister’s spokesman said.

The “meaningful vote” amendment is now the only potential government defeat, after remainers and Brexiters struck a compromise deal overnight over the customs union. Downing Street sources said they would back an alternative amendment on the proposal for “a customs arrangement”, tabled by the backbenchers Nicky Morgan, a remainer, and Jacob Rees-Mogg, a leading Brexiter.

However, on Tuesday pro-Europe Conservatives said they were winning fresh converts to the cause of keeping Britain in the European Economic Area (EEA). An amendment on the issue, which will be debated on Wednesday, is not expected to pass because the Labour frontbench will not back it.

The remainers plan to continue pushing for EEA membership when the trade and customs bills are discussed next month. And at least one Tory backbencher not previously identified as a rebel is expected to sign up. “It’s only going one way,” said one Conservative moderate.

Later in the Commons debate, Davis suggested that the meaningful vote amendment was a Trojan horse to keep the UK in the EU. “People keep using the phrase ‘meaningful vote’ but what it conceals in some cases is that they want to reverse the result of the referendum, and nothing we do will be organised to allow reversal of the result of the referendum,” he said.