A man mowed down pedestrians on a bridge near the British parliament and stabbed a policeman on Wednesday, killing three people before being shot and killed by police.

Another 20 people were injured in what police said they were treating as a "terrorist" attack.

Witnesses said they saw a car plough into people walking on Westminster bridge -- a busy traffic route that is also a popular tourist spot with its views of parliament and the Big Ben clock tower.

Source: b'People with a victim of the UK Parliament attack | Source: Reuters'

It then veered towards the parliament building and hit the railings outside. A man then jumped out of the car and stabbed a police officer before he was shot.

Wednesday's attack was not the first in Europe where a terror suspect used a vehicle to ram pedestrians.

What happened in Berlin in December 2016

On December 19, 2016, Tunisian national Anis Amri hijacked a truck, killing its Polish driver, and slammed into a crowd of people at a packed Christmas market in Berlin.

Amri, 24, was shot dead by Italian police in Milan four days later after travelling through several European countries.

Source: b'A photo from the Berlin attack | Source: Reuters'

The rampage was claimed by the Islamic State group, which released a video in which Amri is shown pledging allegiance to IS chief Abu Bakr al-Baghdadi.

Twelve people were killed, including seven Germans and five foreigners, and injured 56.

This week, Turkish authorities detained three Germans of Lebanese origin at Istanbul's Ataturk airport, saying they had intelligence linking them to the attack.

A German citizen of Jordanian origin allegedly linked to Amri and believed to be an IS member was caught in the Aegean city of Izmir on March 11, according to Turkish media.

Terror attack in Nice in July 2016

On July 14, 2016, Mohamed Lahouaiej Bouhlel, a 31-year-old Tunisian, ploughed a 19-tonne truck into a Bastille Day crowd leaving a fireworks display in Nice on the Promenade des Anglais, the famous palm-lined street overlooking the Mediterranean.

The driver travelled two kilometres (over one mile) through the crowd in the French Riviera city, crashing through barriers and then mowing down people in his path.

Source: b'Police officers stand near a van, with its windscreen riddled with bullets, that ploughed into a crowd leaving a fireworks display in the French Riviera town of Nice | Source: AFP'

After the driver fired at police, officers fired some 20 rounds into the front of the lorry, killing Bouhlel.

Eighty-six people from 19 different countries lost their lives and more than 400 others were injured.

IS later claimed Bouhlel as one of its followers.

Six people were charged over alleged links to Bouhlel, and three others for allegedly helping to arm him.

Terror attack in Glasgow in June 2007

On June 30, 2007, Kafeel Ahmed, a 28-year-old aeronautical engineer from the Indian city of Bangalore, drove a jeep full of gas cannisters into the main terminal of Glasgow airport where the car erupted into flames.

Hundreds of travellers fled in terror.

Passenger Bilal Abdulla, a 29-year-old doctor born in Britain but raised in Iraq, managed to escape from the burning vehicle, but was arrested at the scene after throwing petrol bombs and fighting with police.

Abdulla admitted during his trial that he was a "terrorist," but claimed he only intended the incident as a protest against the British government and to draw attention to the plight of Iraqis.

Abdulla was jailed for at least 32 years in December 2008 for plotting to murder hundreds of people.

Ahmed suffered third-degree burns on 90 percent of his body and died a month after the attack.