"The disruption at the refuelling system of gas stations... in the past few hours, was caused by a cyberattack," state broadcaster IRIB said.
"Technical experts are fixing the problem and soon the refuelling process...will return to normal."
The oil ministry said only sales with smart cards used for subsidized and rationed gasoline were disrupted, and clients could still buy fuel at higher rates, the ministry's news agency SHANA reported.
The disruptions came ahead of the second anniversary of an increase in fuel prices in November 2019 which led to street protests promoted and incentivized by the United States and organized opposition groups in the country.
Industry officials told state TV that nearly half of gas stations had reopened as technicians worked to activate manual settings after online functions were paralysed by hackers.
#Iran suffers from country-wide gas station closures after cyber-attack hits the country.
▪️Gas station owners’ association have said the reason behind outages is cyber-attacks targeting smart gas supply system, which resulted in complete shutdown of the system. pic.twitter.com/pqpNS7Zmfg
Iranian officials assured there were no fuel shortages and that the rest of the gas stations would reopen by midday on Wednesday.
Iran has been targeted by a series of cyber attacks such as one in July when the website of the transport ministry was taken down by what state media called a "cyber disruption."
Also in July, train services were delayed by similarly cyberattacks, with hackers posting the phone number of Supreme Leader Khamenei as the number to call for information.
Likewise, the computer virus Stuxnet, widely believed to have been developed by the United States and Israel, was discovered in 2010 after it was used to attack a uranium enrichment facility in Iran, thought to have been the first publicly known example of a virus being used to attack a country's industrial machinery.