"Based on information about the existence of weapons and explosives at the place of residence of a man wanted on security charges, a (security) unit went to the place accompanied by his father," said a ministry official.
"Two hand grenades, two machine-guns and five pistols were found. As the unit was completing its task, (it came) under heavy fire from unknown elements, which resulted in the deaths of five security men and the wanted man's father.
"Two security men were also wounded," the official said. The interior ministry official added that the wanted fighters, as well as "a number of suspects," were arrested, and that "the incident is still being followed up."
Members of the Saudi "special forces" chased wanted fighters hiding in a villa in the Fayhaa area of al-Nasim district, residents told reporters.
"Saudi security forces clashed with gunmen in the same al-Nassim district on 18 January, and the capital's police chief subsequently said "a number of suspects" had been arrested.
Security forces have repeatedly clashed with suspected Islamist fighters in the past months as they hunt for presumed extremists associated with the al-Qaida network.
Hundreds of suspected militants have been rounded up since last May's triple bombings of residential compounds in Riyadh that killed 35 people, including eight Americans.
A car bomb went off at another expatriate housing complex in the Saudi capital in November, killing 17 people, mostly Arabs.
The latest shootout coincides with a gathering of some 1.7
million Muslim pilgrims amid tightened security at the holy city of Mecca in western Saudi Arabia for the annual hajj rituals starting on Friday.