GENEVA/DUBAI (Reuters) - The king of Saudi Arabia warned his country would strike with an "iron hand" against people who preyed on youth vulnerable to religious extremism, a day after suicide bombers struck three cities in an apparently coordinated campaign of attacks.

In a speech marking Eid al-Fitr, the holiday that celebrates the end of the Islamic holy month of Ramadan, King Salman said a major challenge facing Saudi Arabia was preserving hope for youth who faced the risk of radicalization.

"We will strike with an iron hand those who target the minds and thoughts... of our dear youth," Salman, 80, said.

Four security officers were killed in Monday's attacks that targeted U.S. diplomats, Shi'ite Muslim worshippers and a security headquarters at a mosque in the holy city of Medina. The attacks all seem to have been timed to coincide with the approach of the Islamic Eid holiday.

The U.N. human rights chief on Tuesday described the bombing outside the Prophet Mohammed's Mosque in Medina as "an attack on Islam itself" and many Muslims expressed shock that their second-holiest site had been targeted.

No group has claimed responsibility but Islamic State militants have carried out similar bombings in the U.S.-allied, Sunni Muslim-ruled kingdom in the past year, targeting minority Shi'ites and Saudi security forces.

Zeid Ra'ad al-Hussein, the U.N. High Commissioner for Human Rights and a member of the Jordanian royal family, delivered his remarks via a spokesman in Geneva.

"This is one of the holiest sites in Islam, and for such an attack to take place there, during Ramadan, can be considered a direct attack on Muslims all across the world," he said. "It is an attack on the religion itself."

ATTACK UNNERVES SAUDIS

Militant attacks on Medina are unprecedented. The city is home to the second most sacred site in Islam, a mosque built in the 7th century by the Prophet Mohammed, the founder of Islam, which also houses his tomb.

Attacks on Mecca, the holiest place in Islam, have been extremely rare. The Al Saud ruling family considers itself the protectors of both sites. Islamic State says the Saudi rulers are apostates and has declared its intention to topple them.

Saudis were rattled by the rare, high-profile attack.

"I apologize to everyone if I don't congratulate you this Eid," Khaled bin Saleh al-Shathri, a Saudi businessman, wrote on Twitter. "I am shocked by the deaths of five of my brothers and the wounding of four others as they guarded the holiest places."

Iran, the region's major Shi'ite power, also condemned the attacks.

Saudi Arabia's crown prince and anti-terror tsar, Mohammed bin Nayef bin Abdul-Aziz, sought on Tuesday to reassure Saudis of the country's security.

"The security of the homeland is good, it is at its highest levels and thanks be to God it gets stronger every day," the state news agency SPA quoted him as saying during a visit to some of the wounded in the Jeddah attack.

Prince Mohammed has been credited for ending a bombing campaign by al Qaeda in Saudi Arabia between 2003 and 2006.

Monday's bombings happened days before the end of Ramadan, when Muslims fast from dawn until dusk.

Saudi security officials say Islamic State's supporters inside the kingdom mainly act independently from the group in Iraq and Syria, its main areas of operations.

Salah al-Budair, the imam of the Prophet's Mosque, warned young people about being lured by the "malignant" ideology of Islamic State. "(The bomber) is an infidel who has sold himself to the enemies of his religion and his country," he said.

(Reporting by Stephanie Nebehay, Sami Aboudi, Mostafa Hashem and Tom Finn; Writing by Noah Browning; Editing by Raissa Kasolowsky/Mark Heinrich)