RIYADH - Saudi Arabian police have arrested 28 men for allegedly planning to attack holy sites around Mecca and Medina during the recently finished Muslim hajj pilgrimage, the kingdom's Interior Ministry said Sunday.

The announcement comes two days after the ministry said it arrested an unknown number of men after security forces foiled a plot to carry out a terror attack on holy sites outside Mecca. But Sunday's statement did not say whether the two were arrests were related.

The ministry said 27 of the men were Saudi nationals and one was a foreign resident.

"Thanks to God, the security forces managed to detain members of the deviated group who have links with elements outside (the kingdom) while planning to carry out criminal acts inside," a statement by the Interior Ministry statement said.

Saudi authorities often use the term deviated group to describe terror suspects linked to al-Qaida.

Nearly 3 million pilgrims came to Saudi Arabia for the annual hajj that wound up Friday with a final visit to Mecca after days of performing rituals in the surrounding hills.

The oil-rich, U.S.-allied kingdom, which is the birthplace of al-Qaida leader Osama bin Laden, has been waging a heavy crackdown on the group's militants since a 2003 wave of attacks on foreigners here.

Three weeks before the hajj began, the Saudi government announced a massive security sweep that netted 208 suspects in six different cells allegedly plotting to carry out attacks against the kingdom's oil infrastructure.

The arrests included the capture of 18 suspects led by a Yemeni missile expert who were allegedly "planning to smuggle eight missiles into the kingdom to carry out terrorist operations."

The largest previous sweep by Saudi authorities was announced in April. It netted 172 militants, including pilots allegedly trained to carry out attacks on oil refineries using civilian planes.