After the shock and anguish of a series of terror attacks in recent weeks, Britain will hold a general election Thursday, and security has moved to the top of the agenda.

In the wake of the most recent attack, Prime Minister Theresa May said "enough is enough" and warned that Britain needed to drastically change its approach to guarding against terrorism.

Meanwhile, the British capital is physically adapting to the apparent new threat.

Armed police are being deployed to soft targets like railway stations and tourist hubs. On the famous bridges across the River Thames, barriers have been erected to separate traffic lanes and sidewalks, offering some protection from vehicle attacks — the modus operandi of the two most recent terror incidents in the capital.

But beyond physical defenses, how can Britain protect itself? That question is at the forefront as the country prepares to go to the polls.

More police power

On the campaign trail Tuesday, May pledged to give security services the tools they need.

Britain's Prime Minister Theresa May delivers a speech to Conservative Party members in Mawdesley village hall, Ormskirk, Britain May 1, 2017.

"I will look at giving more powers to the police and the security service, longer sentences for terrorist-related offenses, dealing with this issue of the Internet and ensuring there is no safe space online for terrorists," she said.

The government is pressuring websites like YouTube to police content more rigorously. London Muslim community activist Hamdi Abdalla Mohamud welcomed the focus on online extremism.

"We should work together to tackle all these problems, and to make sure our youth are using proper websites and proper information and good information. Because as parents we don't know what our children are doing, even if they are at home with us. And we would like the government to help us," she told VOA.

Critics say the roots of extremism stem from ideologies within Islam itself and must be confronted.

"We believe that there is a lack of debate on this particular matter. And a lot of especially left-wing groups try avoiding speaking about this issue publicly as a means of being politically correct," said Julia Rushchenko, a lecturer at the University of West London and an associate fellow at the Henry Jackson Society, a policy analysis group in London.

From same district

All three London Bridge attackers came from the Barking and Dagenham district of east London. Muslim leaders there strongly reject any link with their faith.

Khaja Ashfaq Ali, trustee of the Dagenham Central Mosque, said, "We propagate peace and we preach peace. So what we expect from the people is peace and tolerance in the community. So we have a system in place that we follow the Prevent strategy. So we look at what is going on in our community, and we try to avoid as far as possible these kinds of issues."

The government's Prevent strategy works with communities to make it easier to report individuals voicing extremist views.

One of the London Bridge attackers, Khuram Shazad Butt, was twice reported to authorities over concerns about extremism. He was even featured in a documentary on jihadism and was a follower of jailed preacher Anjem Choudary, a convicted Islamic State recruiter.

Tim Farron, the leader of Britain's Liberal Democrat Party, takes part in a vigil for the victims of an attack on concertgoers at Manchester Arena, in central Manchester, England, May 23, 2017.

The government wants an inquiry into security failings. Opposition leaders blame government cuts.

"What is obvious is that policing numbers, investment in that side of our security, has fallen every year Theresa May has had any responsibility for it," Liberal Democrat leader Tim Farron told supporters on the campaign trail.

The terror attacks had given Thursday's election an added urgent dimension. The immediate focus is on preventing further bloodshed. Longer term, the challenges are profound.