General election 2017: Tim Farron and Nicola Sturgeon warn against 'knee-jerk' reaction to terror
The Liberal Democrat and SNP leaders have said civil liberties should not be sacrificed in the response to the London terror attack.
Lib Dem Tim Farron said there was no evidence to support a widening of surveillance powers.
And the SNP's Nicola Sturgeon warned against reforms that could "undermine our own freedoms".
The two leaders both warned against a "knee-jerk" reaction during the Question Time special in Edinburgh.
They faced questions separately on a range of subjects including Scottish independence and Brexit.
- BBC Election Live: Rolling updates
- Guide: Where the parties stand on security
- Labour: Austerity has damaged safety
Following the London terror attack, Prime Minister Theresa May said "things need to change" in the fight against terrorism, calling for more to be done about online extremism and for a review into whether security services needed extra powers.
Both the SNP and the Lib Dems opposed last year's Investigatory Powers Act, branded a "snoopers' charter" by critics, which gives intelligence agencies the power to collect large volumes of data from electronic devices.
Ms Sturgeon said she would "listen very carefully" to any request for more powers but said these were already "wide-ranging".
"What we've got to guard against is the security services having so much data that they can't then make sense of it," she said.
"We must make sure that in our determination... to keep the population safe we don't start to undermine our own freedoms and civil liberties, because these are what makes us who we are."
Mr Farron, whose manifesto promises to "roll back" surveillance powers, said the "desire for something to be done is utterly right". But he said the problem was a lack of resources, not a "lack of surveillance". Agencies could already "follow and track criminals" he said, but did not have "sufficient pairs of eyes".
"The widening of powers is not something that the evidence is there to support," he added.
The two leaders were also quizzed about their demands for referendums - on the Brexit deal for the Lib Dems, and Scottish independence for the SNP.
Both argued they were trying to do what was "right" rather than making a political calculation when the public demand for the polls was questioned.
A woman in the audience asked Mr Farron: "We're having the general election to decide who's giving us the best (Brexit) deal - why do we need another referendum?"
"We had a general election two years ago, we appear to be having another one," he answered, arguing the deal would be "stitched up behind closed doors" and that voters should get the final say.
The Lib Dem leader, who has faced repeated questions during the campaign on his views on homosexuality, was asked whether there was a "conflict" between his faith and his politics.
"Not in the slightest," he said. "If you're a liberal you fight for everybody's right to be who they are. I honestly don't understand the conflict that people think is there."
Record in government
Ms Sturgeon faced some hostile questions from the audience about her call for another independence referendum before the UK leaves the EU.
When she lost the last vote on independence, she had not expected to be talking about another referendum, she said - but the alternative was "we have to put up with Brexit regardless of what it is".
She was also pressed on the SNP's record in government in Scotland - with one man in the audience saying she was good at speaking about independence but "hopeless" at actually governing.
She defended her record on the NHS and education and said it was "legitimate" for such questions to be raised.
But she added: "On Thursday we're not choosing a Scottish government, we're choosing MPs who will go to Westminster to vote on public spending."
Voters should judge her record at the next Scottish Parliament election, she added.
The two leaders were also asked about working with other parties after 8 June - Mr Farron ruled out entering a coalition, while Ms Sturgeon said she would "certainly" seek to join an alliance to keep the Tories out of power if the Parliamentary numbers made it possible.