The Prime Minister – who was within a just 40 yards of the scene – was bundled into a Jaguar which then left "at extreme speed" as gunfire rang out at Parliament during the incident.
A Downing Street source said Mrs May was safe and well after the attack, which has left at least one person dead.
Other MPs and staff sent messages to friends and family to let them know they were safe.
Labour MP Jon Trickett thanked the police and tweeted: "Democracy will not be intimidated by terror."
Former Chancellor George Osborne wrote: "All our thoughts with injured police officer & those keeping our Parliament and our democracy safe right now."
Fellow Tory Conor Burns added: "Police and House security did a great job securing the chamber. We remain inside and on lockdown."
Theresa May is driven away after the Westminster terror attack London Terror Attack: LIVE PICTURES Wed, March 22, 2017
Two dead, 12 injured as knifeman mows into crowd in Westminster
PA 1 of 36
Conservative MP Tobias Ellwood (centre) helps emergency services attend to a police officer outside the Palace of Westminster, London
Mapped: The scene of the attack
There has been a serious incident within the estate
Get Quotes on Home Insurance
Commons Leader David Lidington broke the news of the sickening attack to MPs.
He said: "What I am able to say to the House is there has been a serious incident within the estate.
"It seems that a police officer has been stabbed, that the alleged assailant was shot by armed police.
London is on lockdown following the attack, which has left dozens injured
"An air ambulance is currently attending the scene to remove the casualties.
"There are also reports of further violent incidents in the vicinity of the Palace of Westminster.
"But I hope colleagues on all sides will appreciate that it'd be wrong of me to go into further details until we have confirmation from the police and from the House security authorities about what is going on."
MPs have paid tribute to the brave police officers who secured the scene
Tim Farron, the Lib Dem leader, told Express.co.uk: "I can see people injured on Westminster Bridge. There are a lot of ambulances.
"I was coming down the escalators with loads of other people and police suddenly stopped us all.
"There was no way back up and it was a bottleneck.
Forensics officers work at the scene of the London terror attack
"It was very scary. Everyone was panicking but the solidarity shown was inspiring.
"We're not sure if it was one or two attackers, or if it was the bloke in the 4×4 who attacked everyone on the bridge.
"I heard gunshots, but that was the police taking down the attacker."
Horrifying acts of terrorism Tue, January 31, 2017
Some of the most horrifying terrorist attacks of all time from 9/11 to Mumbai, these murderous acts killed several thousands of people and caused millions of pounds of damage to properties worldwide.
Getty Images 1 of 31
The Wall Street Bombing on 16th September 1920 immediately killed 30 people from the blast, with others dying later from their injuries and wounding 143, the cause of the bombing was never solved
- Westminster Bridge on lockdown following attack
- Heavily armed police patrol Westminster following attack
- Police refuse entry to Westminster tube station
Tory backbencher David Morris added: "One of my colleagues saw it all. A plain clothes police officer took the attacker out. We're still locked in.
"The police swarmed on us initially and secured the whole thing. Security has been great.
"We've been told not to go to the terrace. We can hear lots of shouting but everyone's calm."