Conservative MP Sir David Amess has died after being stabbed multiple times at his constituency surgery in Essex.
Police said a 25-year-old man was arrested on suspicion of murder after the attack at a church in Leigh-on-Sea.
They recovered a knife and are not looking for anyone else in connection with the incident. A counter-terrorism team will lead the investigation.
Boris Johnson has spoken of his shock and sadness at the loss of "one of the kindest" people in politics.
Home Secretary Priti Patel has asked all police forces to review security arrangements for MPs "with immediate effect", a Home Office spokesman said.
Sir David, 69, had been an MP since 1983 and was married with five children. He is the second serving MP to be killed in the past five years, following the murder of Labour MP Jo Cox in 2016.
She was killed outside a library in Birstall, West Yorkshire, where she was due to hold a constituency surgery.
The investigation into the attack will be led by the Metropolitan Police's specialist Counter Terrorism Command, who will determine whether it was a terrorist incident.
A government source told the BBC the man arrested was a British national who, according to initial inquiries, is of Somali heritage.
The prime minister said Sir David had an "outstanding record of passing laws to help the most vulnerable".
"David was a man who believed passionately in this country and in its future. We've lost today a fine public servant and a much-loved friend and colleague," said Mr Johnson.
Ms Patel said the killing "represents a senseless attack on democracy itself", adding that "questions are rightly being asked about the safety of our country's elected representatives".
Speaker of the House of Commons Sir Lindsay Hoyle, who spoke to the home secretary on Friday, also said MPs' security would have to be examined. He said Sir David's death would "send shockwaves across the parliamentary community and the whole country".
He told BBC Two's Newsnight that police were contacting all MPs to check on their safety and reassure them.
Sir Lindsay said he went ahead with his constituency surgery as normal on Friday evening and said it was essential that MPs were able to retain their relationship with their constituents.
"We have got to make sure that democracy survives this," he said.
Sir David, who represented Southend West, was holding a constituency surgery - where voters can meet their MP and discuss concerns - at Belfairs Methodist Church in Eastwood Road North.
Essex Police Chief Constable BJ Harrington said they had received reports of a stabbing shortly after 12:05 BST and within minutes, officers had found Sir David with multiple injuries.
Police and paramedics "worked extremely hard" to save him but he died at the scene, Mr Harrington said.
Police have appealed for anyone who saw the attack, or who has footage from CCTV, dash cams or video doorbell to contact them.
Southend councillor John Lamb told the BBC that Sir David moved his surgeries to different locations around the constituency "to meet the people" and said the attack was "absolutely dreadful".
"We've lost a very good, hard working constituency MP who worked for everyone," he said.
Who was Sir David Amess?
A Conservative backbencher for nearly forty years, Sir David entered Parliament in 1983 as the MP for Basildon.
He held the seat in 1992, but switched to nearby Southend West at the 1997 election.
Raised as a Roman Catholic, he was known politically as a social conservative and as a prominent campaigner against abortion and on animal welfare issues.
He was also known for his championing of Southend, including a long-running campaign to win city status for the town.
Father Jeff Woolnough, parish priest at nearby St Peter's Catholic Church, told the BBC: "Sir David was a great, great man, a good Catholic and a friend to all.
"He's died doing that, that's the remarkable thing. He's died serving the people."
He led a mass at the church on Friday evening in memory of Sir David, describing him as "Mr Southend".
"Have you ever known Sir David Amess without that happy smile on his face?" he asked. "He carried that great east London spirit of having no fear and being able to talk to people and the level they're at. Not all politicians, I would say, are good at that."
Labour leader Sir Keir Starmer said it was a "dark and shocking day", adding that "we have, heartbreakingly, been here before" with the death of Jo Cox.
"We will show once more that violence, intimidation and threats to our democracy will never prevail over the tireless commitment of public servants simply doing their jobs," he said.
Security concerns routine in 21st Century politics
We expect the MPs we elect to see us in person, not to hide behind Parliament's ornate gates and wood-panelled walls.
That demand is met gladly by the vast majority of MPs.
But, increasingly, the job has been accompanied by abuse, intimidation - and risk for MPs and their staff.
One member of the cabinet told me today: "Everyone has had a threat... everyone has had frightening moments."
Dealing with harassment, coping with security concerns and reporting those concerns to the police, is sadly routine in politics in the 21st Century.
It is inevitable in the coming days that there will be calls for a kinder atmosphere at Westminster, and cooler heads in real life, and online.
It is not, however, inevitable that anything at all will change.
Sir David wrote about the impact on MPs of Mrs Cox's murder and a machete attack on Nigel Jones MP in 2000, which led to the death of his aide Andy Pennington, in his diaries published last year.
Referring to that machete attack, he said: "We all make ourselves readily available to our constituents and are often dealing with members of the public who have mental health problems, it could happen to any of us."
Liberal Democrat leader Sir Ed Davey said it was "a truly terrible day for British politics but most importantly of all our prayers are with all the people who loved David".
Flags around Parliament and at 10 Downing Street are being flown at half-mast.
Archbishop of Canterbury Justin Welby said the MP's death was "agonisingly painful" for those who knew him.
"The murder of an MP, in the course of caring for their constituents, is a deep blow to this country, its citizens and everyone who desires a peaceful and flourishing democracy," he said.
The Archbishop of Westminster Vincent Nichols, the leader of the Roman Catholic Church in England and Wales, said Sir David "carried out his vocation as a Catholic in public life with generosity and integrity".
Flowers were left near the scene of the killing, with tributes describing Sir David as "kind and thoughtful" and "such a gentleman".
What security do MPs have?
• When they are in Parliament, MPs are well protected by a specialist armed police department called Parliamentary and Diplomatic Protection
• For most MPs there is not the same close protection when they are in their constituencies
• Parliament offers MPs and their staff guidance on security, including tips on how to run a safe constituency surgery, suspicious post and home security
• Parliament will pay for MPs to have some security measures installed - such as security alarms and shutters
• After the murder of Jo Cox in 2016, the spending on MPs' security rose from £170,576 in 2015/16, to £4.5m two years later
Were you in the area? Have you been affected by what's happened? You can get in touch by emailing email@example.com.
Please include a contact number if you are willing to speak to a BBC journalist. You can also get in touch in the following ways: