When Prime Minister Theresa May called a general election seven weeks ago, she said she wanted a stronger mandate to secure a better deal for the United Kingdom as it left the European Union.
But after three major terrorist atrocities in three months, all claimed by Islamist militants, the political debates about Brexit, as well as education and the public health system, gave way to intense discussion about Islam and security ahead of the June 8 election.
After the latest attack, in which eight people were killed and dozens injured — some stabbed and others rammed by a van driven at high speed into pedestrians — in the London Bridge neighborhood on June 3, May said, "Enough is enough."
At a vigil two days later with politicians, police officers and religious leaders, the Muslim mayor of London, Sadiq Khan, addressed the terrorists and said: "As a proud and patriotic British Muslim, you do not commit these disgusting attacks in my name. Your perverse ideology has nothing to do with the true values of Islam."
That didn't stop increasing calls on Muslims to acknowledge a connection between their faith and jihadi violence, particularly after eyewitnesses said the knife-wielding attackers at London Bridge had shouted: "This is for Allah."
Some of the most emphatic voices have come from commentators in the right-wing press. Daily Mail columnist Richard Littlejohn wrote that while the vast majority of Muslims don't support terrorists, "it is incontestable that the terrorists are all Muslims who quote the Koran to justify their deranged war."
In more measured comments, the archbishop of Canterbury, Justin Welby, said it is not enough for religious leaders to say the attacks had nothing to do with Islam. He told the BBC's Today radio program: "If something is happening in our own faith tradition we must take responsibility for being very, very clear in countering it."
The Muslim commentator and founder of the Women Against Radicalization Network, Henna Rai, urged Muslims to talk more about the reasons for the atrocities and to see it as part of a worldwide campaign. "This is happening because of the terrorists' anti-Western sentiments such as hatred of democracy."
She added that she did not believe the terrorists had targeted the British election campaign; they were happening because Islamists claimed that killings during the Muslim holy month of Ramadan would lead to greater rewards in heaven, and she noted terrorist violence happening elsewhere in the world.
Tariq Ramadan, an Islamic scholar at Oxford University, said the terrorists' interpretations of Islam were distorted.
"But we have a moral duty to take responsibility," he told the BBC. "We have to condemn but also explain the causes. We need to look at political reasons for what happens. Yet to explain is not to justify."
Amid the emotions triggered by the attacks, some in Britain were not so keen on explanations. Commentator Allison Pearson, in the Conservative-leaning Daily Telegraph, called for firm action against Islam by the government: "If mosques which preach hatred of the West need to be closed, then do it."
Ads on London buses and in Tube stations for Islamic Relief, showing a child being carried by rescue workers under the slogan "Save a Life this Ramadan," reportedly angered some commuters.
On Tuesday, the Conservative prime minister said she was prepared to impose new restrictions on the freedom and movement of terrorism suspects. It was unprecedented in a British general election for a political party to announce new policies just before the ballot. But May, who is under pressure over cuts in policing and claims of intelligence failures, said she was willing to do more to take action against suspects "when we have enough evidence to know they present a threat but not enough evidence to prosecute them in full in court. And if human rights laws stop us from doing it, we will change those laws so we can do it."
This would mean in effect the United Kingdom opting out of the European Convention on Human Rights, which it has abided by since 1953. Both the Labour and the Liberal Democrat parties immediately opposed May's proposal.
This is also the first time a British general election campaign was interrupted by terrorism since 1979, when the Conservative politician Airey Neave was blown up by an IRA car bomb in Parliament's car park at the start of that year's election battle.
A government source, who spoke on condition of anonymity, said authorities felt under pressure to take firm action.
"There is a prevailing mood now, we cannot go from one atrocity to another. Something has to be done."
The security focus in the campaign seemed to favor Conservative Party candidates. Certainly, their rivals on the left, including the Labour Party, were finding it hard to shift attention to issues where the Tories would be on shakier ground, such as spending on health and education, care for the elderly and Britain's housing crisis.
One expert proposed that terrorist conspirators be charged with treason after one of the London bombers was revealed this week as having worked at Westminster Tube Station, giving him access, as the London Evening Standard put it, to "tunnels underneath the Houses of Parliament."
It evoked Guy Fawkes, one of Britain's most notorious traitors and part of a Catholic plot to blow up Parliament with gunpowder in its cellars, in 1605. Then and now, the British nation was in a highly febrile mood, fearful of religious conspirators and worried about what the future might hold.