Supporters of Iran’s government and supreme leader have taken to the streets following protests sparked by anger over the country’s ailing economy that have taken place in major cities over the past two days.

The pro-government rallies on Saturday had been scheduled weeks earlier to commemorate mass demonstrations in 2009 that challenged those who had rejected the re-election of Mahmoud Ahmadinejad, the country’s hardline president who faced fraud allegations.

They took on added significance, however, after the economic protests that began on Thursday, sparked by social media posts and a surge in the price of basic food supplies.

Thousands of people joined the protests, which began in Mashhad, Iran’s second-largest city. The demonstrations also took on a political edge as participants chanted criticism of the country’s president, Hassan Rouhani, and his government. Social media videos showed clashes between protesters and police.

The semi-official Fars news agency said protests had spread on Friday to Qom, the world’s leading centre for Shia scholarship and home to a major shrine.

The demonstrations appear to be the largest wave of protest since nationwide pro-reform unrest in 2009, when the Green Movement arose after Ahmadinejad’s re-election.

Police arrested some protesters, but the country’s Revolutionary Guard and its affiliates have not intervened as they have in other unauthorised demonstrations since the 2009 election.

Washington said it strongly condemned the arrests and was monitoring the protests. The state department spokeswoman Heather Nauert said in a statement that the US urged “all nations to publicly support the Iranian people and their demands for basic rights and an end to corruption”.

Donald Trump tweeted his support for the protests early on Saturday:

Many reports of peaceful protests by Iranian citizens fed up with regime’s corruption & its squandering of the nation’s wealth to fund terrorism abroad. Iranian govt should respect their people’s rights, including right to express themselves. The world is watching! #IranProtests — Donald J. Trump (@realDonaldTrump) December 30, 2017

It was unclear whether the US’s president’s intervention would have any impact. Iranians are largely skeptical about him because of his refusal to recertify the nuclear deal. Trump’s insistence in an October speech on using the term “Arabian Gulf” also touched a nerve.

Saturday’s pro-government demonstrations were aired live on state television from across the country, showing people waving flags and carrying banners bearing the image of Ayatollah Ali Khamenei.

About 4,000 people gathered at the Musalla prayer ground in central Tehran. They called for criminal trials for Mir Hossein Mousavi and Mahdi Karroubi, the lGreen Movement leaders who have been under house arrest since 2011. Rouhani, whose administration struck the 2015 nuclear deal with world powers, campaigned on freeing the men, though they remain detained.

Iran’s economy has improved since the nuclear deal, under which the country agreed to limit its enrichment of uranium in exchange for the end of some international sanctions. Tehran now sells oil on the global market and has signed deals worth tens of billions of dollars for western aircraft.

The improvement has not, however, filtered down to the average Iranian. Unemployment remains high and official inflation has crept back up to 10%. A recent increase of up to 40% in the price of eggs and poultry, which a government spokesman blamed on a cull due to avian flu fears, appears to have sparked the protests.