Nick Clegg has suffered a stinging defeat after Liberal Democrat activists overwhelmingly rejected so-called secret courts legislation.
The party's spring conference ordered their MPs and peers to oppose the plans, saying they were contrary to "core" Lib Dem values.
Lawyer Jo Shaw announced in the hall that she was resigning her membership in protest - joining human rights barrister Dinah Rose QC.
Members ignored pleas from deputy leader Simon Hughes and justice minister Lord McNally to pass the emergency motion after a half-hour debate.
The row came despite Mr Clegg defending his handling of the issue in a bad-tempered question and answer session last night.
The Justice and Security Bill was given its third reading in the Commons last week, despite a rebellion from some Tories and Lib Dem MPs and continuing opposition from civil rights campaigners.
The Deputy Prime Minister was barracked and accused of abandoning the party's values on Saturday during the question and answer session.
The leadership was also embroiled in a row over blocking debate on a motion criticising the coalition's economic strategy.
Deputy Prime Minister and Liberal Democrat leader Nick Clegg holds a Q&A session with party members
The session in Brighton got off to a rocky start when Clegg accidentally referred to the "good work Ed Balls is doing", when he meant to praise Energy Secretary Ed Davey.
He then inadvertently suggested that Business Secretary Vince Cable was among "millionaire" pensioners who should be stripped of free bus passes.
The atmosphere became more heated when activists began to challenge Clegg over the Justice and Security Bill, which would allow courts to sit in secret in some civil cases.
One Lib Dem member questioned why Clegg had "abandoned the high ground" by engaging with the proposals.
And another said: "How can we call ourselves a Liberal Democratic party any more if we vote for this legislation?"
However, the party leader said the intelligence services were currently unable to defend themselves in some civil court cases because they could not disclose sensitive material.
He stressed that many changes had already been made to the original proposals, and said he was unable to do what activists wanted and block the measures because only 8% of MPs were Lib Dems.
"It is arithmetically impossible for me to deliver your will unalloyed," he said.
Clegg received strong applause from most of the audience when he said the party had achieved a great deal given its presence in Parliament.
And there was a warm response when he rebuked Tory Defence Secretary Philip Hammond for seeking more cuts to welfare.
"If you are worried about the Ministry of Defence budget why do you want to spend squillions on a like-for-like replacement for Trident?" he asked.
Clegg was also pressed on moves to cap total household benefits at £26,000 per year.
The leader insisted that level was equivalent to earning a salary of around £35,000 before tax.
"I think most people would think that is a fair rule of thumb," he added.
When chairman Andrew Wiseman said it was time to move on from the benefits topic, one audience member loudly complained that the issue should get a fuller airing.
Clegg joked: "The Q&A is turning into a riot."