* May to resume campaigning ahead of Thursday election
* Britain mourns after seven killed in London Bridge attack
* Polls show May's election gamble may be in doubt
* Corbyn says democracy will not be halted by violence
LONDON, June 5 (Reuters) - After a militant attack on a nightlife district of London this weekend, British Prime Minister Theresa May will resume campaigning on Monday just three days before a national election which polls show is much tighter than previously predicted.
May said Britain must be tougher in stamping out Islamist extremism after three knife-wielding assailants rammed a hired van into pedestrians on London Bridge and stabbed others nearby, killing seven people and injuring 48.
After the third militant attack in Britain in less than three months, May said Thursday's election would go ahead. But she said Britain had been far too tolerant of extremism.
"Violence can never be allowed to disrupt the democratic process," May said outside her Downing Street office, where British flags flew at half-staff.
Islamic State on Sunday night claimed responsibility for the attack via the militant group's agency Amaq.
"A detachment of Islamic State fighters executed yesterday's London attack," a statement posted on Amaq's media page, monitored in Cairo, said.
London police arrested 12 people in the Barking district of east London in connection with the attack and raids were continuing there, the force said. Police have not released the names of the attackers.
It was not immediately clear how the attack would impact the election. The campaign was suspended for several days last month when a suicide bomber killed 22 people at a concert by Ariana Grande in Manchester.
Grande gave an emotional performance on Sunday at a benefit gig in the city for the victims of the attack, singing with a choir of local schoolchildren, including some who had been at her show.
Before the London Bridge attack, May's gamble on a June 8 snap election had been thrust into doubt after polls showed her Conservative Party's lead had collapsed in recent weeks.
SHADOW OF ATTACKS
While British pollsters all predict May will win the most seats in Thursday's election, they have given an array of different numbers for how big her win will be, ranging from a landslide victory to a much more slender win without a majority.
Some polls indicate the election could be close, possibly throwing Britain into political deadlock just days before formal Brexit talks with the European Union are due to begin on June 19.
In a sign of how much her campaign has soured just five days before voting begins, May's personal rating turned negative for the first time in one of ComRes's polls since she won the top job in the turmoil following the June 23 Brexit referendum.
May called the snap election in a bid to strengthen her hand in negotiations on Britain's exit from the European Union, to win more time to deal with the impact of the divorce and to strengthen her grip on the Conservative Party.
If she fails to beat handsomely the 12-seat majority her predecessor David Cameron won in 2015, her electoral gamble will have failed and her authority will be undermined both inside the Conservative Party and at talks with 27 other EU leaders.
May said the series of attacks were not connected in terms of planning and execution, but were inspired by what she called a "single, evil ideology of Islamist extremism" that represented a perversion of Islam and of the truth.
Opposition Labour leader Jeremy Corbyn criticised May, who was interior minister from 2010 to 2016, for cutting police numbers during her tenure in charge of the interior ministry.
"The mass murderers who brought terror to our streets in London and Manchester want our election to be halted. They want democracy halted," Corbyn said in Carlisle, northern England.
"They want their violence to overwhelm our right to vote in a fair and peaceful election and to go about our lives freely."
"That is why it would be completely wrong to postpone next Thursday's vote, or to suspend our campaigning any longer."
When May stunned political opponents and financial markets by calling the snap election, her poll ratings indicated she could be on course to win a landslide majority on a par with the 1983 majority of 144 won by Margaret Thatcher.
But since then, May's lead has been eroded, meaning she might no longer score the thumping victory over socialist Corbyn she had hoped for ahead of Brexit negotiations. (Editing by Guy Faulconbridge and Angus MacSwan)