The Conservatives faced criticism over cuts to police numbers as politicians took part in a seven-way television debate just hours after the London Bridge terror attack.

Labour, the SNP, Green party and Plaid Cymru politicians all took the Tories to task for having reduced police numbers by more than 20,000 over the last nine years.

Their coordinated attack in the debate hosted by the BBC was a sign that the issue could become problematic for Boris Johnson in the same way that Theresa May was held accountable for falling police numbers in the wake of terror attacks during the 2017 general election campaign.

Rebecca Long-Bailey, the shadow business secretary representing Labour in the debate, raised the issue of police cuts as she was asked about what should be done to increase security.

After paying tribute to the bravery of the emergency services and public in responding to Friday’s attack, she said: “This was an extreme event but what we can’t ignore is that over recent years we’ve seen increases in violent crime right across the country and at the same time since 2010 we’ve seen over 20,000 police officers cut from frontline services.

Facebook Twitter Pinterest Adam Price, Caroline Lucas, Rebecca Long-Bailey, Rishi Sunak, Richard Tice, Nicola Sturgeon and Jo Swinson with the BBC presenter Nick Robinson before the debate. Photograph: Hannah McKay/PA

“It is right to recognise that that would have a direct impact and of course we’ve got to invest more in community neighbourhood policing and Labour has pledged to do that, but we’ve also got to invest in counter-terrorism measures and make sure they are properly funded.”

She was backed up by Nicola Sturgeon, the SNP leader and first minister of Scotland, who said no amount of police officers could prevent a terror attack but added: “The numbers of police officers is important in ensuring the speed of response we saw today. The government in Scotland has increased and maintained police numbers. I think it’s regrettable that hasn’t happened elsewhere in the UK.”

Adam Price, the Plaid leader, said “resources are always part of the answer” as he criticised lower police numbers in Wales, while Caroline Lucas, the Green MP, said: “More police numbers would certainly help.”

Rishi Sunak, the chief secretary to the Treasury representing the Conservatives, defended his party’s record on security and said voters could “rest assured” that Johnson’s government would keep them safe.

He said: “The first duty of every government is to keep us safe. Investing in the police. Giving them the powers and resources that they need. And you can rest assured on that.”

The 90-minute debate covered a huge range of issues, with opposition parties attacking Sunak on Brexit, the NHS and the use of nuclear weapons.

Richard Tice, the Brexit party chairman, lined up with Sunak to make the case for Brexit and to argue that the NHS is not at risk of being privatised in a US trade deal.

However, the other representatives were scathing about the Tory approach to Brexit and the NHS. Jo Swinson, the Lib Dem leader, said: “I’m sorry to have to say this but we’re so not far along on this Brexit journey – we’re like in episode one of a 10-season box set, and if you don’t like what you’ve seen up to now you don’t have to watch the rest.”

Sturgeon added: “This ‘get Brexit done’ is the biggest con of this election. The deal Boris Johnson has negotiated, I think a bad deal, is only a withdrawal deal – the trade talks haven’t started yet.”

Long-Bailey also went on the attack with Labour’s claim that Johnson would put the NHS on the table in negotiations with Donald Trump, backed up by Sturgeon.

The SNP leader said: “I’m going to be pretty blunt here: when Boris Johnson says the NHS is not on the table in a future trade deal, I simply do not trust him and I do not believe him on that point.”

Sunak branded the idea that the NHS would be for sale a “desperate conspiracy theory”.

On whether they would use nuclear weapons, Price, Lucas and Sturgeon all said they would definitely not use them. Sunak said “yes, if the circumstances demanded”, Swinson said she would be “prepared to” and would assess the situation, while Tice said: “After careful consideration, yes, if it was essential.”

Long-Bailey said the protection of the British people was “paramount” for any prime minister, adding: “They would need to look at the circumstances and of course they would need to take action if necessary.”