Four police officers were killed late Monday when a suicide bomber blew himself up near the Prophet's Mosque in Medina, the second most sacred site in the Islamic world, the Saudi Interior Ministry said.
The attack, 24 hours before the end of the fasting month of Ramadan, was the third suicide bombing to hit Saudi Arabia on Monday.
At least one other bomber hit the mainly Shiite eastern city of Qatif at almost the same time, with parts of three bodies found at the scene, ministry spokesman General Mansour al-Turki said.
A third attack early Monday near the US consulate in the western city of Jeddah killed only the bomber, the ministry said, with two police officers suffering minor injuries.
There were no immediate claims of responsibility for any of the bombings, though the Islamic State extremist group has claimed previous deadly attacks in Qatif.
The Medina suicide bomber blew himself up when police became suspicious and confronted him in a car park adjoining the mosque, al-Turki said. Five police officers were wounded in the blast.
Saudi news site Sabq, which is seen as close to the authorities in the kingdom, earlier reported that the attacker targeted security officials as they ate the Iftar meal, which breaks the daily Ramadan fast.
Worshippers arrived in the mosque as usual for evening prayers after the attack, Saudi-owned broadcaster Al Arabiya reported.
The channel broadcast what it said was video of worshippers filling a hall inside the mosque.
There were conflicting reports of casualties in Qatif, the scene of a May 2015 Islamic State suicide bombing that killed 22 worshippers in a Shiite mosque.
Sabq reported that two suicide attackers blew themselves up after failing to gain entry to the city's Faraj al-Omran mosque. The Interior Ministry's al-Turki referred to one attacker but said that parts of three bodies had been found at the scene.
The Medina and Qatif attacks took place almost simultaneously, at the time of the breaking of the Ramadan fast on the second-last day of the Islamic holy month.
The Islamic State movement, which claimed responsibility for a bombing that killed at least 213 people Sunday in Baghdad, has repeatedly singled out the Saudi royal family for condemnation.
The Interior Ministry implied that it suspected jihadists, condemning "straying elements," its usual term for members of the Islamic State group or the rival al-Qaeda network.