By GREGORY KATZ, Associated Press

LONDON (AP) — 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 country's 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 IS 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.

Former Metropolitan Police commissioner Ian Blair told the BBC that changes to the "outer soft ring" of Parliament's security plan are likely in the aftermath of Masood's attack.

The new footage follows earlier video that showed slight delays and confusion during the evacuation of Prime Minister Theresa May from Parliament as the attack unfolded.

Masood, who at 52 is considerably older than most extremists who carry out bloodshed in the West, had an arrest record in Britain dating to 1983. In 2000, he slashed a man across the face in a pub parking lot in a racially charged argument after drinking, according to a newspaper account. Masood's last conviction, in 2003, also involved a knife attack.

One victim, Danny Smith, told The Sun newspaper that Masood had stabbed him in the face with a kitchen knife after an argument just three days after they met.

Hundreds of British police have been working to determine his motives and are scouring Masood's communications systems, including his possible use of the encrypted WhatsApp device, to help determine if he had any accomplices.

Still, police have released many of those they took in for questioning in the case.

One 58-year-old man remains in custody for questioning after being arrested Thursday in the central English city of Birmingham, where Masood was living. Authorities haven't charged or identified him.

A 32-year-old woman arrested in Manchester has been released on bail and faces further inquiries.

Police said Saturday that a 27-year-old man arrested Thursday in Birmingham has been released.

Eight others arrested in connection with the investigation had been set free earlier, including a 39-year-old woman who had initially been freed on bail but now faces no further police action, police said Saturday.

Details about how Masood became radicalized aren't clear, although he may have become exposed to radical views while an inmate in Britain or while working in conservative Saudi Arabia. It's also not clear when he took the name Masood, suggesting a conversion to Islam.