LONDON — British police charged a man with murder and preparing acts of terrorism Thursday in the stabbing of a Conservative lawmaker who was killed as he met constituents at a church hall last week.

Conservative Member of Parliament, David Amess Chris McAndrew/UK Parliament

Authorities say a 25-year-old British man with Somali heritage, Ali Harbi Ali, has been charged in the death of David Amess. The case shook a nation accustomed to having face-to-face contact with its leaders and engaging in vigorous debate on issues of the day.

“We will submit to the court that this murder has a terrorist connection, namely that it had both religious and ideological motivations,’’ said Nick Price of the Crown Prosecution Service. “He has also been charged with the preparation of terrorist acts.”

The death of Amess, who had served in Parliament for almost 40 years and was knighted by Queen Elizabeth II in 2015, escalated concerns about security among Britain’s politicians, who pride themselves on being accessible to their constituents.

A special session of the House of Commons on Monday resounded with appeals to force social media giants to do more to prevent the spread of online hate that has poisoned political discourse.

The slaying came five years after Labour Party lawmaker Jo Cox was shot and stabbed to death by a far-right extremist. Cox was the first British lawmaker to be killed since a peace accord ended large-scale Northern Ireland violence almost 30 years earlier.

Amess, 69, was a social conservative who opposed abortion, campaigned for animal rights and strongly supported Britain’s exit from the European Union.

Matt Jukes, the Metropolitan Police Assistant Commissioner for Specialist Operations, said the force “will continue to build our case.” He said detectives had analyzed computers, searched several London addresses and reviewed CCTV footage as part of the investigation.

“It remains the case that no other arrests have been made and at this time we are not seeking anybody else in relation to this incident,” he said.

Comments are not available on this story.