Iran denied Monday it was hit by a US cyberattack as Washington was due to tighten sanctions on Tehran in a standoff sparked by the US withdrawal from a nuclear deal.
Both nations say they want to avoid going to war, but tensions have spiralled as a series of incidents, including the US deployment of a aircraft carrier strike group to the Gulf region and the shooting down of a US drone by Iran in the Gulf, raised fears of an unintended slide towards conflict.
The denial came as US Secretary of State Mike Pompeo arrived in Saudi Arabia for talks on the tensions with Iran and was also due to visit the United Arab Emirates for similar discussions.
US President Donald Trump called off a planned retaliatory military strike Friday after Iran said it had shot down an American surveillance drone the previous day near the strategic Strait of Hormuz.
Tehran says the drone violated Iranian airspace and Foreign Minister Mohammad Javad Zarif has backed the claim with maps and coordinates.
US media reports said Trump ordered a retaliatory cyberattack against Iranian missile control systems and a spy network after the drone was shot down.
But on Monday Iranian Telecommunications Minister Mohammad Javad Azari Jahromi said no cyberattack against his country had ever succeeded.
"The media are asking about the veracity of the alleged cyberattack against Iran. No successful attack has been carried out by them, although they are making a lot of effort," he said on Twitter.
He acknowledged that Iran has "been facing cyber terrorism - such as Stuxnet - and unilateralism - such as sanctions," naming a virus believed to have been engineered by Israel and the US to damage nuclear facilities in Iran.
"We foiled last year not one attack but 33 million attacks with Dejpha shield," Azari Jahromi said, referring to a new internet defence system.
Iran last week warned that any US attack would see Washington's interests in the Middle East go up in flames.
Speaking to reporters as he left Washington, Pompeo called Saudi Arabia and the United Arab Emirates "two great allies in the challenge that Iran presents."
"We'll be talking with them about how to make sure that we are all strategically aligned and how we can build out a global coalition," he said.
He reiterated Trump's offer of dialogue to improve relations with Iran, which the US administration has sought to isolate through harsh sanctions.
"We're prepared to negotiate with no preconditions. They know precisely how to find us," he said.
Pompeo also dismissed as "child-like" a map released Sunday by the Iranian foreign minister that purported to show a spy drone encroaching Iran's airspace in late May.
Trump, who spent Saturday huddling with his advisers, said he was ready to reach out to Iran if the country agreed to renounce nuclear weapons.
"When they agree to that, they're going to have a wealthy country. They're going to be so happy, and I'm going to be their best friend," he told reporters.
Iran has denied seeking a nuclear weapon, and says its program is for civilian purposes.