An Interior Ministry statement carried by the official Saudi Press Agency said security men clashed with the suspected terrorists, killing two of them and seizing a car laden with explosives.
It said the authorities are still investigating the identities of the two terrorists and other possible accomplices. A detailed statement would be released later, it added.
Saudi Arabia has been stung by major attacks during the past seven months. Seventeen people were killed in a suicide bombing at a housing compound in the capital on Nov. 8, and in May, suicide bombings at three housing compounds in Riyadh left 35 dead, including 9 suicide bombers.
The May bombings spurred a massive crackdown by Saudi officials in which some 600 terrorism suspects were detained and several were killed.
The Arab kingdom has also been the subject of a slew of warnings by foreign governments to their citizens living or traveling there.
A day before the Nov. 8 bombing, the U.S. Embassy in Riyadh and America's consulates in Jiddah and Dhahran closed following terror warnings.
Even after the offices reopened, diplomats urged Americans in Saudi Arabia to vary their times and routes for essential travel, park their vehicles in protected areas and check their cars before using them.
Similar warnings were issued by U.S. or British authorities in August, September and October.
Saudi Arabia has been under pressure to crush networks that include al Qaeda, the terror group blamed for the Sept. 11, 2001 attacks on the United States. Fifteen of the 19 Sept. 11 hijackers were Saudis.
Saudi officials have been irked by continued allegations by U.S. officials of links between the kingdom and terror groups. To polish their image, Saudi Arabia has spent $17.6 million on public relations, advertising and lobbying since the Sept. 11 attacks.