A Saudi security official said the shootout erupted when members of the special security forces besieged villas in the city's Al-Suwaidi district on Tuesday.
Exchanges of fire were heard at around 1630 GMT as policemen surrounded a villa in which at least five gunmen were holed up.
Residents said the hunt for the men started on Monday night.
Villas in the area were evacuated on Tuesday evening as security forces took up positions on rooftops.
Residents saw police drag out and arrest suspected activists.
"I saw one man break free from police and run away after kicking off his shoes. Police were chasing him," a resident said.
Saudi Arabia has arrested scores of opposition members since the May bombings in Riyadh which left 35 people dead.
Security forces have since been involved in a series of shootouts with Islamists they have tried to arrest in various parts of the kingdom.