An internet cafe in Tehran. Google says there has been a surge in hacking activity in recent weeks. Photograph: Raheb Homavandi/Reuters

Google reports it has stopped a series of attempts to hack the email accounts of tens of thousands of Iranian users in what the company believes is an attempt to influence the country's upcoming election.

"For almost three weeks, we have detected and disrupted multiple email-based phishing campaigns," Eric Grosse, the vice-president for security engineering, wrote in a post on Google's blog on Wednesday. The phishing campaigns are originating in Iran, targeting users there and representing a big surge in the region's hacking activity before Iran's presidential election on Friday, Grosse said.

"The timing and targeting of the campaigns suggest that the attacks are politically motivated," he said. He did not give further details.

The relatively routine phishing attempts direct users to fake account maintenance pages where they are asked to give their username and password, Grosse said.

Google said it used its Chrome browser to detect phishing efforts from what appears to be the same Iranian group in 2011.

Iranians will vote on Friday to find a successor to Mahmoud Ahmadinejad, who cannot run for a third term in office.

Hassan Rouhani, a moderate cleric who rejects Ahmadinejad's combative approach in world affairs, has become the frontrunner in the final days before the election after pro-reform candidate Mohammad Reza Aref pulled out on Tuesday and former presidents Mohammad Khatami and Akbar Hashemi Rafsanjani threw their support behind Rouhani.