The likely bombers were identified as two Yemeni nationals living under aliases in the kingdom who were detained along with two Saudi citizens also suspected of involvement in the plot, the official from the Presidency of State Security added.
Saudi Arabia has previously been hit by deadly bombing and shooting attacks by ISIS targeting security forces and Shi'ite Muslims.
The assailants were training in the use of explosive belts, the security source added, while authorities said they seized grenades and firearms during the operation to foil the attack.
In a separate news item, SPA quoted a security source saying it had uncovered the "intelligence activities for the benefit of foreign parties of a group of people against the security, interests, principles, capabilities and social welfare of the kingdom in order to provoke sedition and harm national unity."
The official did not elaborate and it was not immediately clear if the two cases were linked.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.