Jeremy Corbyn has said people convicted of terrorism offences should “not necessarily” serve their full sentence, calling for an examination of how the prison system deals with such offenders.

The Labour leader was speaking before a speech in York on Sunday in which he responded to Friday’s terrorist attack at London Bridge by saying that Britain’s repeated military interventions had “exacerbated rather than resolved” the problem of terrorism.

Corbyn’s comments came as the Ministry of Justice said it was conducting a review of licence conditions of about 70 terrorists released under licence since 2000.

Usman Khan – who killed two people in the attack, before being shot dead by police – was previously jailed for an al-Qaida-inspired plot to blow up the London Stock Exchange and was wearing an electronic tag at the time of the incident. He was released from jail on licence in 2018, half way through a 16-year sentence.

Asked on Sky News’s Sophy Ridge on Sunday whether people convicted of terrorism offences should serve their full sentences, the Labour leader said “not necessarily”.

“I think it depends on the circumstances, it depends on the sentence but crucially it depends on what they have done in prison,” he said. “I think there has to be an examination of how our prison services work and crucially what happens to them on release from prison.”

He added: “There has to be an examination of what goes on in the prison because prisons ought to be a place where people are put away because of major, serious offences but also a place where rehabilitation takes place.”

Arguments over the blame for Friday’s attack have come to dominate the election campaign, with the prime minister promising a package of hardline changes which also include mandatory minimum 14-year sentences and an end to automatic early release for terrorism and extremism offences.

Trouble on the doorstep as Lib Dems and Labour fight to appeal to voters Read more

Corbyn was asked about his previous criticism of “shoot to kill” policies. He said the police had no choice but to shoot Khan dead. “They were stuck with a situation where there was a credible threat of a bomb belt around his body and it’s an awful situation for any police officer, any public servant to be put in,” he said.

He added: “There should never be the first alternative to shoot people, but if there is no other alternative then that’s what you do.”

Corbyn repeated his belief that British citizens fighting for Isis overseas should be returned as it was the UK’s responsibility to deal with them. “If you strip away their citizenship, where are they going to go?” he said.

The Labour leader argued that “letting them loose” into an ungoverned space such as Libya would cause a greater danger in the long run. “It is making us safer by preventing the growth of terrorist forces, by preventing the growth of irrational powerful forces and also looking at who’s funding them, looking at who’s making money out of them, looking at who’s supporting them,” he said.

The foreign secretary, Dominic Raab, appearing on the same programme, was asked about comments made by the father of Jack Merritt, one of the victims of Friday’s attack. Writing on Twitter on Saturday, David Merritt said his son would not have wanted his death to be used as the pretext for more draconian sentencing.

“No one wants to see the politicisation of this,” said Raab, before going on to say that only a Conservative government could keep people safe.

“I don’t think after what we’ve seen, both in this election and in the previous election, in the individuals involved, that anyone would think taking the measures necessary to protect the public and putting their interests and their safety at the forefront – and as the overriding priority – would be somehow politicisation,” he said.

“I think it’s the necessary thing to do to keep people safe and it is only this prime minister and the Conservatives who are offering that.”

Speaking to an audience at York college later on Sunday, the Labour leader accused the government of putting people at risk through its cuts to the police and youth services and its part-privatisation of the probation services. “You can’t keep people safe on the cheap,” he said.

“Real security doesn’t only come from strong laws and intelligence. It comes also from effective public services that have the funding they need. Real security demands more than the correct operational decisions by trained and properly funded professionals.”

Corbyn said that government mistakes “in no way absolve terrorists of blame for their murderous actions”, but that foreign policy had also “fuelled, not reduced that threat”.

“Sixteen years ago, I warned against the invasion and occupation of Iraq,” he said. “I said it would set off a spiral of conflict, hate, misery, desperation … that will fuel the wars, the conflict, the terrorism and the misery of future generations. It did, and we are still living with the consequences today.”