LONDON — The British police on Thursday charged a 25-year-old man with murder in the killing of David Amess, a lawmaker who was stabbed in a town east of London last week.
The police said in a statement that the suspect, Ali Harbi Ali of North London, had also been charged with preparation of terrorist acts.
In an appearance at Westminster Magistrates’ Court later in the day, a prosecutor, James Cable, alleged that Mr. Ali had plotted to kill a member of Parliament for two years, according to news reports. Mr. Cable also said that Mr. Ali was suspected of being affiliated with the Islamic State, though he did not go into detail, the news reports said.
The attack has rattled the British political establishment and intensified concerns over the security precautions for members of Parliament.
Mr. Amess, a Conservative Party lawmaker who represented part of Southend, a town in the county of Essex, was meeting with constituents at a church in the Leigh-on-Sea neighborhood at the time of the attack. Members of the local community have been shocked by the brazen public killing in their seaside town.
“I want to send my deepest condolences to the family, friends and colleagues of Sir David Amess, who died so tragically last Friday,” Matt Jukes, the Metropolitan Police’s assistant commissioner for specialist operations, said in the statement. “Sir David’s dedication to his family, his constituents and his community, and his positive impact on the lives of so many has shone through.”
The police said they were still building their case and urged members of the public who had further information on the attack to come forward. They said there were no other suspects at this time.
Mr. Ali, a British citizen of Somali heritage, is the son of a former adviser to a previous Somali prime minister, Harbi Ali Kullane. In an interview with The Times of London earlier this week Mr. Kullane expressed shock at his son’s arrest.
“It’s not something that I expected or even dreamt of,” he said.
The killing shook not just the community where Mr. Amess had been a lawmaker for decades but the country as a whole. On Monday, Prime Minister Boris Johnson and lawmakers from across the political spectrum paid tribute to Mr. Amess in speeches in Parliament. Mr. Johnson called him “a patriot who believed passionately in this country, in its people, in its future.”
Mr. Amess is the second British lawmaker to be killed in recent years.
In 2016, a right-wing extremist fatally stabbed Jo Cox, a Labour Party lawmaker, outside a meeting with constituents. In 2010, an Islamist extremist seriously wounded another Labour lawmaker, Stephen Timms, stabbing him twice in the stomach.
Lawmakers say that the practice of meeting constituents — known in Britain as “surgeries’’ — is an essential part of the political process and that it continue, but the attack on Mr. Amess has spurred proposals for introducing stricter security.