The annual hajj pilgrimage to Mecca, which drew 2 million Muslims from around the world, has been epidemic-free, Saudi Arabia’s acting health minister has said.

Oil-rich Saudi Arabia, home to Islam’s holiest sites, engaged thousands of health workers to make sure pilgrims were protected from two deadly viruses, Ebola and Middle East respiratory syndrome coronavirus (Mers-CoV).

As pilgrims performed the final rituals of the hajj and began returning home, Adel Fakieh said: “I am pleased to announce the hajj was free of all epidemic diseases.”

Among its preventive measures, Fakieh’s ministry set up a “command and control” centre to direct the hajj health operation, and required every pilgrim to complete a health screening questionnaire.

Passengers were monitored by thermal cameras that detect high body temperature, and 15 isolation rooms were set up to hold any suspicious cases at the airport in the city of Jeddah.

Fakieh said 170 people were considered as possibly having Mers but all proved to be negative.

Saudi Arabia is the country hardest hit by Mers, which has killed 322 people in the kingdom since it first appeared in September 2012.

The health ministry on Sunday reported two more Mers deaths, one in the capital Riyadh and another in Taif, 50 miles (80km) east of Mecca.

Ebola has killed more than 3,000 people in west Africa.

Saudi Arabia did not allow pilgrims to come from Guinea, Liberia and Sierra Leone, which have been hardest hit by the illness.