The assailant was, however, later shot by the police.
Reuters reports that the incident appeared to have unfolded in several locations, including on the nearby Westminster Bridge, where eyewitnesses said a car crashed into pedestrians.
“Officers, including firearms officers, remain on the scene and we are treating this as a terrorist incident until we know otherwise,” London’s Metropolitan Police said in a statement.
The incident took place on the first anniversary of attacks by Islamist militants that killed 32 people in Brussels.
Reuters reported that there were loud bangs inside the parliament followed by two people lying on the ground in a courtyard just outside, within the perimeter of the parliamentary estate.
No fewer than 12 people were injured on Westminster Bridge, next to parliament.
“I just saw a car go out of control, and just go into pedestrians on the bridge. As we were going across the bridge, we saw people lying on the floor, they were obviously injured. I saw about 10 people maybe. And then the emergency services started to arrive. Everyone was just running everywhere,” a woman, who gave her name as Bernadette, told Sky News.
The House of Commons, which was in session at the time, was immediately suspended and lawmakers were asked to stay inside.
Prime Minister Theresa May was safe after the incident, a spokesman for her office said. He declined to say where May was when the attack took place.
Another eyewitness told LBC Radio that he witnessed the stabbing of the policeman and the shooting of the assailant from his office in the parliament building.
“The policeman fell on the ground and it was quite horrible to watch and then having done that, he (the assailant) disengaged and ran toward the House of Commons entrance used by members of parliament and got about 20 yards or so when two plain-clothed guys with guns shot him.”
United States President, Donald Trump, told reporters at the White House that he had been briefed on events in London but gave no details.