MOUNTAIN VIEW, Calif. (AP) — Google said Wednesday that it has discovered and stopped a series of attempts to hack the 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 the company’s blog.

The phishing campaigns are originating in Iran, targeting users there and representing a big surge in the region’s hacking activity. They are apparently tied to Iran’s presidential election 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 phony account maintenance pages where they are asked to give their username and password, Grosse said.

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

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

Hasan Rowhani, 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 Tuesday and a pair of popular former presidents threw their support behind Rowhani.

Rowhani is up against four conservatives and a hard-liner who remain in the race.