Iran's IT Minister, Mohammad Javad Azari-Jahromi uploaded images from a computer screen with US flags and messages from hackers via his official Twitter account.
The attacker left a picture of the US flag along with a warning message, "Do not disturb our election," the Iranian Ministry of Technology and Information said.
He mentioned, still not known who the mastermind behind the attack. He said the attacks mainly affected Europe, India and the United States.
"This attack affects 200 thousand switch routers worldwide in a massive attack, including attacks on 3500 switches in our country," said Minister of Communications and Information Technology in an official statement as quoted from Iran's official media, IRNA.