According to state media, a cyberattack affected the supply of heavily subsidized gasoline in Iran on Tuesday, prompting long lineups at gas stations around the nation only weeks before the anniversary of 2019 major demonstrations in response to fuel price rises.

Iran says it is on high alert for internet attacks, which it has previously blamed on the US and Israel. Meanwhile, the US and other Western governments have accused Iran of attempting to disrupt and breach into their networks.

"The disruption at the refueling 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 refueling process...will return to normal."

According to the oil ministry's news agency SHANA, only purchases with smart cards used for cheaper rationed gasoline were affected, and customers could still buy fuel at higher prices.

Tips on how to stay safe online and defend against cyber attacks

The disturbances occurred ahead of the second anniversary of a fuel price hike in November 2019, which sparked major public protests and resulted in hundreds of people being killed by security forces.

Social media videos revealed seemingly hacked street signs with inscriptions like "Khamenei, where is our gasoline?" in reference to Supreme Leader Ayatollah Ali Khamenei.

Iran has previously been targeted by a number of cyberattacks, including one in July when the transport ministry's website was brought down by what state media described as a "cyber disturbance."