LONDON (Reuters) - A video filmed by a MP shows the initial panic inside parliament during Wednesday's attack in London in which an assailant killed three people nearby.

Cries of "Is he coming?" and "Get back, get back" can be heard in the clip from member of parliament David Davies as he runs through a building warning those around.

He told British media he was walking with a colleague to parliament's lower chamber, the House of Commons, from nearby Portcullis House when he heard gunfire.

The footage shows him running up an escalator and stairs. British media quoted him saying he ran back to Portcullis House where people were "milling around".

A British-born assailant, once investigated by MI5 intelligence agents over concerns about violent extremism, ploughed a car into pedestrians on Westminster Bridge before running through the gate of the parliament building and fatally stabbing a policeman. He was then shot dead.

Islamic State was responsible for the attack, the group's Amaq news agency said on Thursday.

Doreen Massey, a peer in the upper House of Lords chamber, said people inside the parliament building were not immediately aware of what was going on.

"We just knew it was something serious because the police came and said: 'This is not a rehearsal, this is for real -- follow us'. So we thought we better do that," she said.

(Reporting by Polly Rider and Marie-Louise Gumuchian; Additional reporting by Emily Roe; Editing by Catherine Evans)