Dozens of bodies sheathed in black bags line the floor of an Iranian morgue, while workers in protective suits and masks busily walk among them.

It's unclear which, if any, of the people whose bodies lie in the morgue were infected with the coronavirus gripping the country, in this footage from inside Qom's Behesht-e Masoumeh morgue.

And here lies a huge problem for Iran, which is one of the worst-hit countries outside China, with more than 3,500 people infected and at least 107 dead from the virus, according to officials.

Under Islamic tradition in Iran, corpses are typically washed with soap and water before burial. But two medical workers in Qom told CNN that in some cases precautions related to the outbreak are preventing staff from observing traditional Islamic guidelines for burial.

Instead, they said the bodies of those confirmed to have coronavirus at the time of death are being treated with calcium oxide, to prevent them from contaminating the soil once buried in cemeteries.

The sources spoke to CNN anonymously, for fear of reprisals from Iran's security apparatus.

Testing for the virus takes time, delaying burials and creating a "pile up" of bodies at the morgue, said Behesht-e Masoumeh morgue director, Ali Ramezani, in a report on Iranian state TV, IRIB.

"What we are dealing with is how to handle the bodies of coronavirus victims versus non-coronavirus victims as the instructions for burial are different," said Ramezani.

He added: "Some families prefer that we keep their deceased, for a day or two, until their test results are completed.

"And if the results come back negative, then there is no need to treat the deceased according to guidelines outlined for coronavirus victims, and the family can bury the deceased wherever they have planned to bury them."

One person has been arrested for allegedly circulating video from inside the morgue, which state broadcaster IRIB confirmed was filmed inside Qom's Behesht-e Masoumeh.

Their case has been referred to the Judiciary, according to a report from Iran's semi-official news agency ISNA.

Friday prayers canceled

The apparent backlog of bodies for burial comes as Iran grapples with a rapid rise in coronavirus cases. The country had 591 new positive cases recorded since Wednesday, the country's health ministry spokesman Kianush Jahanpour said Thursday.

He added that 739 people have also recovered from the virus and left hospital.

All of Iran's 31 provinces have been hit with the virus, the health ministry announced Thursday. The capital Tehran has the highest number at 1,523, while the city of Qom, the reported epicenter of Iran's epidemic, had 386 confirmed cases.

Iran, along with Italy, has the highest recorded number of deaths from the virus outside of China, at 107.

The country has come under pressure from other Middle Eastern nations -- including Iraq, the United Arab Emirates and Bahrain -- which have reported cases with links to the Iranian city of Qom, where several holy sites are regularly visited by large crowds.

Iran has banned Friday prayers in the centers of all provinces across the country for the second week in a row, to help curb the spread of the virus. Schools and universities have also been shut, while concerts and sports events have been canceled.

On Thursday, Health Minister Saeed Namaki announced a national plan to tackle the virus that will include all 17,000 health centers and 9,000 medical clinics in every part of the country, according to IRNA.

Under the plan, some infected people will have to stay home under quarantine but continue receiving medical supplies. Those with more serious conditions will stay in hospital, Namaki said.

The number of medical facilities to test for the virus will more than double to 40 by the end of the week, he added.

Earlier in the week, the Health Ministry also announced it would be activating a nationwide team of 300,000 health workers and specialists to defeat the spread of the virus.

The country also plans to temporarily release 54,000 people from prisons as it tackles the epidemic. However Iran's Judiciary spokesman Gholamhossein Esmaili did not elaborate on where they would be kept or how authorities would keep track of them.

Iranian officials initially reassured its nationals that the virus would be contained, but it was difficult to convince Iranians that was the case as 23 members of parliament tested positive for the virus and an adviser to Supreme Leader Ayatollah Ali Khamenei died on Monday.

CNN's Ramin Mostaghim in Tehran, Hamdi Alkhshali, Mohammed Tawfeeq and Raja Razek in Atlanta and Mostafa Salem in Abu Dhabi contributed to this report