Amess’s killing sparked shock and outrage as well as a review of security for MPs.
The assistant commissioner Matt Jukes, who leads Scotland Yard’s counter-terrorism command, said: “I want to send my deepest condolences to the family, friends and colleagues of Sir David Amess, who died so tragically last Friday.
“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.
“Today’s charge is a significant milestone in the case, but the work from my colleagues in the Met’s counter-terrorism command will continue apace.
“There has been considerable speculation in the media about the background, history and motivation of the man now charged.
“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.”
The CPS added: “The function of the CPS is not to decide whether a person is guilty of a criminal offence, but to make fair, independent and objective assessments about whether it is appropriate to present charges for a criminal court to consider.
“The CPS assessment of any case is not in any sense a finding of, or implication of, any guilt or criminal conduct. It is not a finding of fact, which can only be made by a court, but rather an assessment of what it might be possible to prove to a court, in accordance with the code for crown prosecutors.
“Some offences, including murder, can be classed as having ‘a terrorist connection’ to ensure the criminal charges properly reflect the conduct concerned.
“In these cases the individuals have had political, religious racial and/or ideological motivations behind their crime.”
Following Amess’s death, police have contacted MPs to review their security.
Amess’s family visited Belfairs methodist church in Leigh-on-Sea, where the veteran MP of 38 years’ service was attacked and died.
In a tribute his family said: “We are enormously proud of him. Our hearts are shattered. However, there was still so much David wanted to do – this we know from the events of the last few days.”
They also called for less rancour and more unity in society as they praised the backbencher: “Strong and courageous is an appropriate way to describe David. He was a patriot and a man of peace. So, we ask people to set aside their differences and show kindness and love to all. This is the only way forward. Set aside hatred and work towards togetherness.
“Whatever one’s race, religious or political beliefs, be tolerant and try to understand. As a family, we are trying to understand why this awful thing has occurred. Nobody should die in that way. Nobody.
“Please let some good come from this tragedy. We are absolutely broken, but we will survive and carry on for the sake of a wonderful and inspiring man.”
Ali has been in custody since last Friday with his first court appearance next Thursday.