Londoners celebrate the life of slain British parliament member Jo Cox in June. Extremist Thomas Mair was found guilty of the slaying on Nov. 23, 2016. (Justin Tallis/AFP/Getty Images)

A man whose bookshelf was full of writings on white supremacy and Nazism was found guilty Wednesday of killing British lawmaker Jo Cox in an apparent political attack as the country headed toward its landmark vote on European Union membership.

The shooting and stabbing in June stunned Britain and underscored the divisions over the E.U. referendum, which tipped in favor of groups — including right-wing and nationalist factions — seeking to leave the bloc.

Cox, a 41-year-old mother of two young children, was a well-known campaigner for Britain to remain in the European Union and a passionate advocate for refugees.

Wednesday’s verdict against her attacker, Thomas Mair, 53, carried added international resonance as hate groups and others in the United States say they are energized by the presidential victory of Donald Trump and his America-first campaign rhetoric.

During the trial, several witnesses told the jury that Mair shouted “Britain first!” as he fired three shots at her and stabbed her 15 times.

Thomas Mair sentenced to a “whole life-term.” (Reuters)

Judge Alan Wilkie said in his sentencing remarks that the crime was so exceptional that he issued a “whole life-term” sentence, which effectively eliminates the chance for parole or early release. The judge said that the murder was done to further a political motive of “violent white supremacism and exclusive nationalism most associated with Nazism and its modern forms.”

Mair’s inspiration, the judge said, was “not love of country” but “an admiration for Nazisism and similar anti-democratic, white supremacist creeds.”

Mair spoke only once in court, at his first hearing, when he said his name was “death to traitors, freedom for Britain.” He asked to speak Wednesday after the jury had delivered its verdict, but the judge refused his request.

Sue Hemming, head of special crime and counterterrorism at the Crown Prosecution Service, said Mair had “offered no explanation for his actions.”

But, she added, “the prosecution was able to demonstrate that, motivated by hate, his premeditated crimes were nothing less than acts of terrorism designed to advance his twisted ideology.”

Cox was killed June 16 outside a library in Birstall in northern England on her way to meet constituents. It was just after lunchtime in the quiet market town when Mair, a local resident, attacked. Cox shouted to her colleagues, “Get away you two — let him hurt me.”

Several people tried to intervene, including Bernard Kenny, 77, whom Mair stabbed in the stomach.

When police searched Mair’s home, they found a bookshelf with a wide collection of books about white supremacy and Nazi Germany.

Speaking after the verdict, Cox’s husband, Brendan, said that he felt only “pity” for Mair, adding that the murder was a “political act and an act of terrorism.”

In an interview with the BBC, Cox’s widower said that he asked friends to write down memories of his late wife, an energetic, determined woman who climbed mountains and lived on a boat. He said that he often reads the stories to his children in the evening.

“They love them,” he said. “They love the exciting ones, the dangerous ones, the adventurous ones, the funny ones. And there’s lots and lots of stories. We have a lifetime of stories. Jo packed in 80 or 90 years into the 40 she lived.”