Interior Ministry spokesman Maj. Gen. Mansour al-Turki said Taie bin Salem bin Yaslam al-Saya'ari was killed yesterday by police in the capital's northern Yasmeen neighborhood.
The July 4 bombing outside of 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 Jiddah.