British police charged Ali Harbi Ali, 25, with murder of lawmaker David Amess, who was stabbed to death on Friday at a meeting in his constituency, saying it was an act of terrorism.
Amess's murder has shocked Britain's political establishment coming five years after another lawmaker was murdered, prompting calls for increased safety for members of parliament.
"We will submit to the court that this murder has a terrorist connection, namely that it had both religious and ideological motivations," Nick Price, Head of the Crown Prosecution Service Special Crime and Counter Terrorism Division.
"He has also been charged with the preparation of terrorist acts. This follows a review of the evidence gathered by the Metropolitan Police in its investigation."
Ali, the son of an ex-media adviser to a former prime minister of Somalia, is due to appear at London's Westminster Magistrates' court later on Thursday.
"There has been considerable speculation in the media about the background, history and motivation of the man now charged," said Matt Jukes, London police's Assistant Commissioner for Specialist Operations.
"I understand the huge level of public interest in this case, but now a charge has been brought, it is vitally important that everyone exercises restraint when commenting on it publicly, to ensure future court proceedings are not prejudiced in any way."
British police are not looking for any other suspect after Ali was charged with the murder of lawmaker Amess, a senior police chief said.
"It remains the case that no other arrest has been made and at this time we are not seeking anybody else in relation to this incident," said Matt Jukes, Assistant Commissioner for Specialist Operations at London's Metropolitan Police.