Jeremy Corbyn will say police should be able to use “whatever force is necessary” if they believe an attacker is wearing a suicide vest and innocent lives are at risk.

The Labour leader will speak about the importance of properly funded public services and is expected to say that people cannot be kept safe “on the cheap”.

In a speech on Sunday in York, Mr Corbyn will say budget cuts over the last 10 years leave “gaps” which can lead to “missed chances to intervene in the lives of people who go on to commit inexcusable acts”.

He will pay tribute to the emergency services and members of the public who responded to the London Bridge attack, saying: “We all owe the deepest debt of gratitude to our emergency services – to the incredibly brave police officers who put their own lives on the line to save others and to all our emergency service workers involved in responding to the incident and caring for the injured.

“They are true professionals and our whole country is proud of them.”

Attacker Usman Khan was tackled by members of the public before he was shot dead by police.

In his speech, Mr Corbyn is expected to say: “I will always do whatever is necessary and effective to keep our people safe.

“First of all, the police who put themselves on the line to protect us will have the authority to use whatever force is necessary to protect and save life.

“If police believe an attacker is wearing a suicide vest and innocent lives are at risk, then it is right they are able to use lethal force.”

Mr Corbyn’s comments come a couple of weeks after Boris Johnson accused him of being “naive to the point of being dangerous” when he suggested the leader of so-called Islamic State (IS) should have been arrested and put on trial.

The Labour leader said that if it had been possible to take Abu Bakr al-Baghdadi alive and put him before the International Criminal Court, that would have been “the right thing to do”.

But Mr Johnson said he was not being “realistic” about the measures needed to protect the country in the face of terrorist threats.

Al-Baghdadi died in October when he blew himself up with a suicide vest during a raid by US special forces on his hideout in Syria.

In an interview with LBC radio, Mr Corbyn said it was “a very good thing” that the IS leader had been “removed from the scene”.

But at the same time, he said he stood by the view he expressed in 2011 when he said it was a “tragedy” that Osama bin Laden had been killed rather than brought to trial.

Meanwhile, in his speech in York, Mr Corbyn will say: “It is our duty to look calmly and seriously at what we need to do to give people real security. Our public services are the glue that bind our society together.

“Community policing, the probation service, mental health, youth and social services, all play a vital part.

“When those public services are cut back as they have been during the past decade, they leave behind gaps.

“That can lead to missed chances to intervene in the lives of people who go on to commit inexcusable acts, whether it’s during their childhood, their first brush with the law, their first conviction, or in prison through rehabilitation programmes.

“Take the probation service, part-privatised in 2014, resulting in disaster. The most serious cases stayed in a justice system badly undermined by austerity. A failure to recruit has left huge staffing shortfalls and with staff supervising more cases than ever expected, posing a serious risk to our security.

“Real security doesn’t only come from strong laws and intelligence, it comes also from effective public services that have the funding they need. You can’t keep people safe on the cheap.”

In the aftermath of the London Bridge attack, a row flared up when Home Secretary Priti Patel blamed a previous Labour government after Yvette Cooper, Labour candidate and former chair of the Commons Home Affairs Committee, asked how the attacker could have been released when he was deemed so dangerous.

Ms Patel took to Twitter to respond to Labour’s Ms Cooper, and also tweeted Mr Corbyn after he said questions need to be urgently answered regarding the roles of the Parole Board and probation services.

She wrote: “The Parole Board could not be involved in this decision @jeremycorbyn.

“Your party changed the law in 2008 so that Khan was automatically released irrespective of the danger he posed. Very concerning that you want to be PM but don’t understand this.”