Four people are dead and dozens injured after a man drove a car along a pavement in Westminster, London, before stabbing a policeman and being shot dead.
The officer, who died at the scene, has been named as Constable Keith Palmer, 48, a husband and father.
The attacker has not been named by police.
Acting Deputy Commissioner and head of counter terrorism at the Metropolitan Police Mark Rowley said they thought they knew the attacker's identity and that he was inspired by international and Islamist-related terrorism, but gave no further details.
Police said there would be more armed and unarmed officers on duty in London and across the country as a "precautionary measure".
The other three victims who died were members of the public.
Were you there? Send us your pictures and tell us about your experience: email@example.com
Mr Rowley said hundreds of officers were now working on the case and were focussing on the motivation, preparation and possible associates of the attacker.
A lockdown of the Houses of Parliament has been lifted.
Mr Rowley paid tribute to Constable Palmer, saying: "He was someone who left for work today expecting to return home at the end of his shift, and he had every right to expect that would happen."
He said the parliamentary protection team were a combination of armed and unarmed officers and "sadly the officer who lost his life today was unarmed".
"He was supported by armed colleagues who shot and killed the attacker."
"Heartbroken" former colleague, Conservative MP James Cleverly, paid tribute to the "lovely man" he had known for 25 years. The pair had served together in the Royal Artillery before Constable Palmer became a policeman.
UK Foreign Office minister Tobias Ellwood - a former army officer whose brother died in the Bali terrorist bombing in 2002 - attempted mouth-to-mouth resuscitation of Constable Palmer.
London mayor Sadiq Khan tweeted that Constable Palmer had been killed protecting the city and democracy from those who wanted to destroy their way of life.
Nearby hospital St Thomas said it was treating patients for "catastrophic" injuries.
Among them was a woman pulled alive, but with serious injuries, from the Thames River. Three French schoolchildren, aged about 15 or 16, were also hurt.
Three police officers were among the injured, two of whom were in a serious condition.
South Korea's Foreign Ministry said five of its citizens, in their 50s and 60s, had been injured.
Earlier, Mr Rowley said police believed there was only one attacker, but that the police operation was ongoing.
"We are satisfied at this stage that it looks like there was only one attacker. But it would be foolish to be overconfident early on."
Witnesses described seeing the man mow down pedestrians in his car, including on Westminster Bridge.
As the attack began, MPs inside the central London building said they had heard three or four gunshots.
Reuters reporters inside Parliament said a large number of armed police, some carrying shields, had poured into the building.
Parliament, which was in session at the time, was immediately suspended. MPs were told to stay inside, but were later moved to Westminster Abbey.
Prime Minister Theresa May was seen being ushered into a silver Jaguar as what sounded like gunfire rang out at Parliament during the incident.
Mrs May chaired a meeting of the government's emergency Cobra committee to discuss the immediate response to the incident, and later, speaking outside 10 Downing Street, led condemnations of the "depraved" assault by the world's leaders.
The incident took place on the first anniversary of attacks on Brussels in Belgium.
Britain is on its second-highest alert level of "severe" meaning an attack by militants is considered highly likely. Mrs May said that would not change after the Westminster attack.
The New Zealand High Commission in London said no New Zealanders were caught up in the attack.
In May 2013, two British Islamists stabbed to death soldier Lee Rigby on a street in southeast London.
In July 2005, four British Islamists killed 52 commuters and themselves in suicide bombings on the British capital's transport system in what was London's worst peacetime attack.
- BBC / RNZ