DUBAI, United Arab Emirates — Hard-line Shiite faithful in Iran pushed their way into the courtyards of two major shrines just closed over fears of the new coronavirus, Iranian state media reported Tuesday, as the Islamic Republic pressed on with its struggle to control the Mideast’s worst outbreak.

Roughly nine out of 10 of the over 17,000 cases of the new virus confirmed across the Middle East come from Iran, where authorities denied for days the risk the outbreak posed. Officials have now implemented new checks for people trying to leave major cities ahead of Nowruz, the Persian New Year, on Friday, but have hesitated to quarantine the areas.

Late on Monday night, angry crowds stormed into the courtyards of Mashhad’s Imam Reza shrine and Qom’s Fatima Masumeh shrine. Crowds typically pray there 24 hours a day, seven days a week, touching and kissing the shrine. That’s worried health officials, who for weeks ordered Iran’s Shiite clergy to close them.

Earlier on Monday, the state TV had announced the shrines’ closure, sparking the demonstrations.

“We are here to say that Tehran is damn wrong to do that!” one Shiite cleric shouted at the shrine in Mashhad, according to online video. Others joined him in chanting: “The health minister is damn wrong to do that, the president is damn wrong to do that!”

Police later dispersed the crowds, state media reported. Religious authorities and a prominent Qom seminary called the demonstration an “insult” to the shrine in a statement, urging the faithful to rely on “wisdom and patience” amid the closure.

Iran’s shrines draw Shiites from all over the Mideast for pilgrimages, likely contributing to the spread of the virus across the region. Saudi Arabia earlier closed off Islam’s holiest sites over the fear of the virus spreading.

President Hassan Rouhani on Tuesday said despite the closures, “our soul is closer to the saints more than at any time.”

State TV reported that Iran had deployed teams to screen travelers leaving major cities in 13 provinces, including the capital, Tehran. But Iran has 31 provinces and authorities haven’t taken the step to lock down the country like in the allied nations of Iraq and Lebanon.

The teams check travelers’ temperatures and will send those with fevers to quarantine centers. Iran has been urging people to stay home, but many have ignored the call.