LONDON — The British man who killed four people during a London rampage had made three trips to Saudi Arabia: He taught English there twice on a work visa and returned on a visa usually granted to those going on a religious pilgrimage.

More details about attacker Khalid Masood's travels, confirmed by the Saudi Arabian embassy in Britain, emerged Saturday amid a massive British police effort to discover how a homegrown ex-con with a violent streak became radicalized and why he launched a deadly attack Wednesday on Westminster Bridge.

The embassy said he taught English in Saudi Arabia from November 2005 to November 2006 and again from April 2008 to April 2009, with legitimate work visas both times. He then returned to Saudi Arabia for six days in March 2015 on a trip booked through an approved travel agent and made on an "Umra" visa, usually granted to those on a religious pilgrimage to the Islamic holy sites.

The embassy said Saudi security services didn't track Masood and he didn't have a criminal record there.

Before taking the name Masood, he was called Adrian Elms. He was known for having a violent temper in England and had been convicted at least twice for violent crimes.

Masood drove his rented SUV across London's crowded Westminster Bridge on Wednesday, striking pedestrians. Then he jumped out and stabbed to death police Officer Keith Palmer, who was guarding Parliament, before being shot dead by police.

In all, he killed four people and left more than two dozen hospitalized, including some with catastrophic injuries. The Islamic State group has claimed responsibility for the attack, calling him a "solider" who responded to its demands that followers attack countries in the coalition fighting ISIS in Syria and Iraq.

British officials said security at Parliament will be reviewed after new footage emerged that showed the large gates to the complex were left open after Masood rushed onto the grounds. There are concerns that accomplices could have followed him in and killed even more people. The footage from that day shows pedestrians walking by the open gates and even a courier entering Parliament grounds.