A suicide bombing outside one of Islam's holiest sites has killed four Saudi security officers and wounded five others.

Similar attacks on Monday targeting US diplomats in Jeddah and Shi'ite worshippers in Qatif followed days of mass killings claimed by the Islamic State group in Turkey, Bangladesh and Iraq.

The attack happened outside the mosque grounds where the Prophet Muhammad is buried in Medina. Millions of Muslims from around the world visit the mosque every year as part of their pilgrimage to Mecca.

The attacks appear to have been timed to coincide with the approach of Eid al-Fitr, the holiday that celebrates the end of the Islamic holy month.