Saskia Jones and Jack Merritt, who were killed in the attack, had worked with a prison education program backed by Cambridge University.

Credit...Peter Summers/Getty Images

LONDON — They were two bright, idealistic young people who believed passionately in prison rehabilitation and threw themselves into a program that educates inmates, aiming to give them hope and reduce their odds of reoffending.

On Friday, a celebration of that program became the tragic last act of their lives. Both recent Cambridge University graduates, they then became victims of a murderous rampage by a former prisoner, an alumnus of the very program they had dedicated themselves to.

The two victims — Saskia Jones, 23, and Jack Merritt, 25 — died and three others were injured in what the police have called a terrorist attack in central London. The episode seized the nation’s attention and raised tough questions about the rehabilitation system they were so devoted to, and about Britain’s criminal sentencing, prison release and post-release supervision.

They came from towns far removed from the urban crime that would become such a focus of their lives — Ms. Jones in Stratford-upon-Avon, in the West Midlands, and Mr. Merritt in Cottenham, near Cambridge.

She volunteered with Cambridge’s Learning Together program after graduating with a master’s in philosophy from the university in 2018. She had recently applied for a police recruitment program, her family said, and planned to specialize in victim support.

Friends and relatives described Ms. Jones as warm, determined and dedicated to the idea that inmates should have opportunities to reform and build the foundations for productive lives.

Her family, in a statement released by London’s Metropolitan Police, described her as a “funny, kind and positive influence” adding that her death would leave a “huge void in our lives.”

“She had a wonderful sense of mischievous fun and was generous to the point of always wanting to see the best in all people,” the family said. “She was intent on living life to the full and had a wonderful thirst for knowledge.”

Professor Loraine R. Gelsthorpe, the director of Cambridge University’s Institute of Criminology, which the Learning Together initiative is part of, said in a statement that Ms. Jones’s “warm disposition and extraordinary intellectual creativity was combined with a strong belief that people who have committed criminal offenses should have opportunities for rehabilitation.”

Mr. Merritt was a program coordinator who began working with Learning Together after graduating from Cambridge, also with a master’s of philosophy, in 2017.

“Jack’s passion for social and criminal justice was infectious,” Professor Gelsthorpe said in her statement. “He was deeply, creatively and courageously engaged with the world, advocating for a politics of love. He worked tirelessly in dark places to pull towards the light.”

A tribute to him from a friend, Hollie, quickly spread after being posted to Twitter on Sunday night. “You were quite simply the best thing, completely golden,” she wrote. “Your voice won’t be lost.”

In a statement released through the London police, Mr. Merritt’s family remembered him as a man who “lived his principles.”

“He believed in redemption and rehabilitation, not revenge, and he always took the side of the underdog,” the family said. “Jack was an intelligent, thoughtful and empathetic person who was looking forward to building a future with his girlfriend, Leanne, and making a career helping people in the criminal justice system.”

A vigil to honor Ms. Jones, Mr. Merritt and those injured in the attack was held on Monday in Guildhall Yard in central London, along with tributes to the emergency services and members of the public who responded to the attack — some of whom had links to Learning Together, including former prisoners.

Even as Prime Minister Boris Johnson argued that the killings showed a need to strengthen sentencing for terrorism, Mr. Merritt’s family pleaded that the episode not be used to score political points or justify a tougher approach to criminal justice.

“We know Jack would not want this terrible, isolated incident to be used as a pretext by the government for introducing even more draconian sentences on prisoners, or for detaining people in prison for longer than necessary,” the family said.

The attack came two weeks before Britain heads to the polls for a general election, and candidates were swift to condemn the attack and offer conflicting views on it, including blaming one another.

Mr. Johnson, a Conservative, called for longer sentences, stricter standards for early release and a review of past releases of inmates convicted of terrorism offenses. He told the B.B.C. that 74 people jailed for terror offenses have been releases early. “I have long said that this system simply isn’t working,” he said in an interview with The Telegraph. “It does not make sense for us as a society.”

Mr. Merritt’s father, David, criticized right-wing tabloids that picked up on the prime minister’s message.

Writing on Twitter, he accused them of publishing “vile propaganda” based on his son’s death. “Jack stood against everything you stand for — hatred, division, ignorance,” he wrote.

Jeremy Corbyn, the leader of the opposition Labour Party, told Sky News that he believed that the criminal justice system needed to be reassessed. But he challenged the idea that people sentenced for terrorism offenses should not be released early, and pointed to cuts made by recent Conservative governments to monitoring and support for former inmates.

“I think there has to be an examination of how our prison services works and, crucially, what happens to them on release from prison,” Mr. Corbyn said. He pointed out that the parole board was not involved in the release from prison of Usman Khan, the man who carried out Friday’s attack.

Mr. Khan, 28, was part of a gang that plotted in 2010 to plant explosives in the London Stock Exchange. He was sentenced to 16 years in prison but was released last year, having served eight years of the sentence. The judge at his trial had warned about the threat he might still have posed to the public.

Mr. Khan’s lawyer, Vajahat Sharif, told Sky News on Sunday that he believed that cases of “ideological offenders,” like Mr. Khan, were especially complex.

To ensure public safety, he said, “specialists need to get involved in the custodian element of the sentence” for several years before a person is released from prison on parole.

Former prisoners, probation staff members, students and experts on criminology from across Britain had gathered on Friday for the fifth anniversary celebration of the Learning Together program when Mr. Khan began attacking those in attendance with a knife.

He then ran onto nearby London Bridge, where he was wrestled to the ground by bystanders before being shot and killed by the police, who said he appeared to be wearing a hoax explosive device.

Friday’s attack left Londoners shaken by yet another burst of terrorist violence. In an attack carried out on the same bridge in June 2017, three men killed eight people before being killed by the police. Another episode earlier that year on nearby Westminster Bridge left six people dead, including the attacker.

Both Mr. Corbyn and Mr. Johnson attended Monday’s vigil, as did London’s mayor, Sadiq Khan, who addressed the crowd after a moment of silence.

“We come together this morning as Londoners to remember, to honor and to mourn the innocent lives lost as a result of the horrific terrorist attack this Friday,” the mayor said.

He asked for the city’s residents to “take hope from the heroism of ordinary Londoners and our emergency services who ran toward danger, risking their lives to help people they didn’t even know.”