The man who planned a suicide bombing in July outside the mosque where the Prophet Mohammed is buried was one of the two extremists killed in a shoot-out with police in Riyadh, Saudi Arabia said.
Interior Ministry spokesman Major General Mansour al-Turki said Taie bin Salem bin Yaslam al-Saya'ari was killed on Saturday by police in the capital's northern Yasmeen neighbourhood.
The July 4 bombing outside the Medina mosque killed four Saudi security force members and wounded five.
Millions of Muslims from around the world visit the mosque every year as part of their pilgrimage to Mecca.
The same day, separate suicide bomb attacks targeted a Shiite mosque in eastern Saudi Arabia and the US Consulate in Jeddah.
The state-run Saudi Press Agency reported Mr al-Turki's comments early on Sunday.