The issue has also been divisive among religious authorities.
"This is a historic debate between Muslim jurists that dates back to the early days of Islam," said Mohsen Alviri, an academic and theologian from Qom, a Shiite holy city that is the epicentre of Iran's coronavirus outbreak.
"Some people prioritise religious rituals, which they place above everything, even medical science," said the hodjatoleslam, or middle-ranking cleric.
Others "think we can abandon obligatory prayers to save a human being's life," he added.
Ayatollah Mohammad Saidi, head of the Fatima Masumeh mausoleum in Qom, a place of pilgrimage visited each year by crowds of Shiites from Iran and abroad, is from the first category.
In an online video that went viral last week, Saidi insisted the place of worship should remain open to the faithful, despite the COVID-19 illness outbreak, which Iran says has claimed 66 lives out of 1,501 cases of infection.
"This sacred shrine (is) a house of healing," he said, inviting pilgrims to come so that they can be "healed of their physical and spiritual illnesses".
Two days earlier, Qom's top security body had ordered the suspension of collective prayers in the province.
It also ordered the disinfection of the mausoleum and the installation of barriers to keep people back from a tomb whose ornate silver-plated enclosure is usually touched or kissed by the faithful.
An article published a few hours later on the mausoleum's website criticised the decision as "an error based on lack of faith".
The article, which was referred to as a statement by Iranian media but is no longer available online, repeatedly referred to what it presented as "the antibacterial effects of silver".
Following the exchange between the government and the mausoleum, Health Minister Saeed Namaki announced restrictions on the entry to Shiite holy sites.
The government had to make concessions, he implied, while indicating that it had made proposals that were "stricter" than those that were finally adopted.
Under the government's new guidelines, worshippers would only be allowed to enter pilgrimage sites if they had hand sanitising liquid and masks, and as long as they avoided close contact with each other and simply prayed before leaving.
Advice on ways to prevent novel coronavirus infections has appeared in droves on billboards and on television in Iran.
Authorities also took the rare decision to cancel the main weekly Muslim prayers in Tehran and other cities, including Mashhad, an important pilgrimage site.
Eating the virus
"Nothing justifies the closure of this divine duty," Ayatollah Ahmad Alamolhoda, the imam who leads prayers in northeastern Mashhad, was quoted as saying by state news agency IRNA.
But one hodjatoleslam has a different opinion.
"If specialist doctors recommend collective prayers should be temporarily suspended or that attendance at religious sites should be reduced, then this should be adhered to," Mohammadreza Zaeri said.
"If someone were to be contaminated by (a cleric's) negligence, then (this cleric) would certainly be religiously responsible," Zaeri, who writes for a religious monthly, said on the messaging service Telegram.
Iran's supreme leader Ayatollah Ali Khamenei entered the debate on Thursday, praising doctors and nurses and expressing hope that their dedication would "soon eradicate the sinister virus".
In Qom, Grand Ayatollah Safi Golpayegani issued a fatwa on Saturday calling on the population to "take into account" the health ministry's recommendations.
But in another viral video, Jafar Ghafouri, an activist of a branch of Shiism that rejects the Islamic republic, appears to lick the tomb of Imam Reza in Mashhad, saying, "I am eating the virus to reassure you and keep you coming to the mausoleum".
He has since been arrested, according to several Iranian media outlets.
Since it first emerged in China late last year, the novel coronavirus has spread to more than 60 countries and infected nearly 90,000 people.
Iran has the highest death toll for any country outside China.