Two Labour MPs have resigned from the shadow frontbench over a bill to allow covert agents to break the law.
Former shadow financial secretary Dan Carden and Margaret Greenwood defied the party whip to vote against the Covert Human Intelligence Sources Bill.
In a letter to Labour leader Sir Keir Starmer, Mr Carden said he feared the law would set "dangerous new precedents".
Labour MPs had been ordered to abstain from the vote on the bill.
The bill passed the Commons with 313 yes votes to 98 noes. It now proceeds to the Lords.
Thirty four Labour MPs defied the whip to vote against the bill.
Margaret Greenwood, who was shadow schools minister, said she could "not stand by" and allow the passage of a bill which "will profoundly impact our civil liberties".
Other notable Labour "no" votes included the party's former leader Jeremy Corbyn and Diane Abbott, who was Mr Corbyn's shadow home secretary.
SNP, Lib Dem and Plaid Cymru MPs also opposed the bill at third reading.
The government insists the bill will "help keep our country safe".
The bill would explicitly authorise MI5, the police, the National Crime Agency and other agencies that use informants or undercover agents to commit a specific crime as part of an operation.
A number of Labour MPs have already voiced their concerns over the human rights implications of the legislation, as well as some Tory backbenchers, who believe it could impinge on people's liberty.
The Unite union has also criticised the bill, saying there was a "well-documented history of state surveillance of lawful trade union activity and justice campaigns in recent years" and it threatened their future.
In his letter, Mr Carden said he had followed the party's orders on previous votes over the bill, hoping he could "work constructively to shift the party's position towards opposing the bill" at its next stage, but it was "now clear that this has not been possible".
He added: "You will understand that as a Liverpool MP and trade unionist, I share the deep concerns about this legislation from across the Labour movement, human rights organisations, and so many who have suffered the abuse of state power, from blacklisted workers to the Hillsborough families and survivors."
Despite his resignation, Mr Carden said the Labour leader still had his "full support".
He said: "My focus now and in the months ahead will remain on representing my Liverpool Walton constituency and fighting for the people of my city as we face the huge challenges posed by the coronavirus pandemic. "
A cross-party group of MPs have put forward an amendment to the same legislation to stop children being used as undercover agents and informants - apart from in exceptional circumstances.
Presenting the amendment in Parliament, Labour MP Stella Creasy said "not everyone of these people is James Bond who can give consent freely" and that some children who become involved in cases "will be very vulnerable people who will need us to stand beside them and insure their interests are protected".
She added: "Let's send the message that children should be children, not child spies."