In this Feb. 24, 2020, photo, Muslim pilgrims pray near the Kaaba, the cubic building at the Grand Mosque, as worshippers circumambulate around during the minor pilgrimage, known as Umrah in the Muslim holy city of Mecca, Saudi Arabia. Saudi Arabia halted Thursday, Feb. 27 travel to the holiest sites in Islam over fears of the global outbreak of the new coronavirus just months ahead of the annual hajj pilgrimage, a move coming as the Mideast has over 220 confirmed cases of the illness. (AP Photo/Amr Nabil)

Saudi Arabia on Thursday halted travel to the holiest sites in Islam over fears about a viral epidemic just months ahead of the annual hajj pilgrimage, a move that came as the Mideast has over 240 confirmed cases of the new coronavirus.

The extraordinary decision by Saudi Arabia stops foreigners from reaching the holy city of Mecca and the Kaaba, the cube-shaped structure the world's 1.8 billion Muslims pray toward five times a day. The decision also affected travel to Prophet Muhammad's mosque in Medina. Authorities also suspended entry to the kingdom to those with tourist visas from nations affected by the new virus.

The decision showed the worry about the outbreak potentially spreading into Saudi Arabia, whose oil-rich monarchy stakes its legitimacy on protecting Islam's holy sites.

The epicenter in the Mideast's most-affected country, Iran, appears to be in the holy Shiite city of Qom, where the faithful in reverence reach out to kiss and touch a famous shrine. Iran now has the highest death toll from the virus—22 dead from among 141 confirmed cases—outside of China, where the outbreak began.

The tiny, oil-rich nation of Kuwait announced a sudden jump to 43 cases from 26 on Thursday as well, all linked to travelers who recently came from Iran.

In this Monday, Feb. 24, 2020, 2020, photo, Muslim pilgrims circumambulate around the Kaaba, the cubic building at the Grand Mosque, during the minor pilgrimage, known as Umrah in the Muslim holy city of Mecca, Saudi Arabia. Saudi Arabia on Thursday, Feb. 27, 2020, halted forei to the holiest sites in Islam over fears about a new viral epidemic just months ahead of the annual hajj pilgrimage. (AP Photo/Amr Nabil)

There have been no confirmed cases of the new coronavirus in Saudi Arabia amid the outbreak.

"Saudi Arabia renews its support for all international measures to limit the spread of this virus, and urges its citizens to exercise caution before traveling to countries experiencing coronavirus outbreaks," the Saudi Foreign Ministry said in a statement announcing the decision. "We ask God Almighty to spare all humanity from all harm."

Disease outbreaks always have been a concern surrounding the hajj, required of all able-bodied Muslims once in their life, especially as pilgrims come from all over the world. The earliest recorded outbreak came in 632 as pilgrims fought off malaria. A cholera outbreak in 1821 for instance killed an estimated 20,000 pilgrims. Another cholera outbreak in 1865 killed 15,000 pilgrims and then spread worldwide.

In this Aug. 13, 2019, file photo taken with a slow shutter speed, Muslim pilgrims circumambulate the Kaaba, the cubic building at the Grand Mosque, during the hajj pilgrimage in the Muslim holy city of Mecca, Saudi Arabia. Saudi Arabia on Thursday, Feb. 27, 2020, halted travel to the holiest sites in Islam over fears of the global outbreak of the new coronavirus just months ahead of the annual hajj pilgrimage, a move coming as the Mideast has over 220 confirmed cases of the illness. (AP Photo/Amr Nabil, File)

More recently, Saudi Arabia faced the danger from another coronavirus, one that caused the Middle East respiratory syndrome, or MERS, which jumped from ill camels to humans. The kingdom increased its public health measures during the hajj in 2012 and 2013, though no outbreaks occurred amid the pilgrimage.

Since September 2012, there have been nearly 2,500 cases of MERS reported, with 858 deaths attributed to the virus, according to the World Health Organization.

Since it emerged in December in central China, the new coronavirus has sickened 82,000 people globally, with more than 2,700 deaths.

While millions attend the hajj, which is this year set for late July into early August, millions more come during the rest of the year to the holy sites in the kingdom. Those other pilgrimages are referred to as the umrah. One of the biggest times for the umrah is the Muslim holy fasting month of Ramadan, which is set to begin at the end of April.

In this Feb. 24, 2020, photo, Muslim pilgrims pray near Maqam Ibrahim, or the Station of Abraham, the golden glass structure, center, at the Grand Mosque in the Muslim holy city of Mecca, Saudi Arabia. Saudi Arabia halted Thursday, Feb. 27 travel to the holiest sites in Islam over fears of the global outbreak of the new coronavirus just months ahead of the annual hajj pilgrimage, a move coming as the Mideast has over 220 confirmed cases of the illness. (AP Photo/Amr Nabil)

"It is unprecedented, at least in recent times, but given the worldwide spread of the virus and the global nature of the umrah, it makes sense from a public health and safety point of view," said Kristian Ulrichsen, a research fellow at the James A. Baker III Institute for Public Policy at Rice University. "Especially since the Iranian example illustrates how a religious crossroads can so quickly amplify the spread and reach of the virus."

But by leaving the suspension of travel to the holy sites open-ended, Saudi Arabia has opened the possibility of this year's hajj potentially being disrupted as well.

The hardest-hit nation in the Mideast is Iran, where the state-run IRNA news agency reported the new 22 deaths out of 141 cases of the illness, named COVID-19.

Experts are concerned Iran may be underreporting cases and deaths, given the illness' rapid spread from Iran across the Persian Gulf. For example, Iran still has not confirmed any cases in Mashhad, even though a number of cases reported in Kuwait are linked to the Iranian city.

  • In this Aug. 7, 2019, file photo, Muslim pilgrims circumambulate around the Kaaba, the cubic building at the Grand Mosque, ahead of the Hajj pilgrimage in the Muslim holy city of Mecca, Saudi Arabia. Saudi Arabia on Thursday, Feb. 27, 2020, halted travel to the holiest sites in Islam over fears of the global outbreak of the new coronavirus just months ahead of the annual hajj pilgrimage, a move coming as the Mideast has over 220 confirmed cases of the illness. (AP Photo/Amr Nabil, File)

  • In this Monday, Feb. 24, 2020, photo, Muslim pilgrims circumambulate around the Kaaba, the cubic building at the Grand Mosque, during the minor pilgrimage, known as Umrah in the Muslim holy city of Mecca, Saudi Arabia. Saudi Arabia on Thursday, Feb. 27, 2020, halted forei to the holiest sites in Islam over fears about a new viral epidemic just months ahead of the annual hajj pilgrimage. (AP Photo/Amr Nabil)

  • A nurse cares for patients in a ward dedicated for people infected with the coronavirus, at Forqani Hospital in Qom, 78 miles (125 kilometers) south of the capital Tehran, Iran, Wednesday, Feb. 26, 2020. Iran's president said Wednesday, that Tehran has no immediate plans to quarantine cities over the new coronavirus rapidly spreading across the country, even as the Islamic Republic suffers the highest death toll outside of China with 19 killed amid 139 cases confirmed on Wednesday. (Mohammad Mohsenzadeh/Mizan News Agency via AP )

  • A medic moves a patient in a ward dedicated for people infected with the coronavirus, at Forqani Hospital, in Qom, 78 miles (125 kilometers) south of the capital Tehran, Iran, Wednesday, Feb. 26, 2020. Iran's president said Tehran has no immediate plans to quarantine cities over the new coronavirus rapidly spreading across the country, even as the Islamic Republic suffers the highest death toll outside of China with 19 killed amid 139 cases confirmed on Wednesday. (Mohammad Mohsenzadeh/Mizan News Agency via AP)

  • A worker disinfects subway trains against coronavirus in Tehran, Iran, in the early morning of Wednesday, Feb. 26, 2020. Iran's government said Tuesday that more than a dozen people had died nationwide from the new coronavirus, rejecting claims of a much higher death toll of 50 by a lawmaker from the city of Qom that has been at the epicenter of the virus in the country. (AP Photo/Ebrahim Noroozi)

In Bahrain, which confirmed 33 cases as of Thursday morning, authorities halted all flights to Iraq and Lebanon. It separately extended a 48-hour ban over flights from Dubai and Sharjah in the United Arab Emirates, through which infected travelers reached the island kingdom off the coast of Saudi Arabia.

Iranian President Hassan Rouhani said there were no immediate plans to quarantine cities but acknowledged it may take "one, two or three weeks" to get control of the virus in Iran.

As Iran's 80 million people find themselves increasingly isolated in the region by the outbreak, the country's sanctions-battered economy saw its currency slump to its lowest level against the U.S. dollar in a year on Wednesday.

Meanwhile, Iraq's Health Ministry on Thursday announced the first coronavirus case in the capital, Baghdad, bringing the overall number of cases reported in the country to six. All have been linked to Iran.

Iraq has taken drastic measures to stem the spread, including ordering schools and universities closed for 10 days, starting Thursday. The government also banned public gatherings and ordered the closures of cinemas, cafes, clubs and other social forums for the same period. It wasn't immediately clear whether the ban of public gatherings would include anti-government protest sites such as Baghdad's landmark Tahrir Square, where demonstrators have been staging a sit-in for months.