Gunfire and explosions rocked the district in the eastern Saudi city of Dammam for hours on Tuesday morning as special forces besieged the villa.
At one point, an explosion was seen blasting debris and white smoke spewed out of a neighbouring building.
After noon, the fighting fell silent, and special forces buses were seen leaving the area.
A security official confirmed that the fighting had ended and police were clearing the scene.
Some charred bodies have been found inside the building, the official said, adding that four security troops were killed and 10 wounded during three days of fighting.
The official spoke condition of anonymity.
State-run television quoted unnamed security officials giving the same information.
The clashes intensified after daybreak on Tuesday when a military helicopter flew in low over the district and dropped off a team of commandos near the villa where the insurgents were holed up.
The shooting became heavier, rocket propelled grenades exploded, and the black smoke billowing from the roof of the militants' villa became thicker.
Police cordoned off the entire Mubarakiah district in Damman, 400km northeast of the capital Riyadh.
Tight security measures
Police checkpoints did not allow any vehicle to leave the neighbourhood on Tuesday.
A convoy of security vehicles
brought in fresh troops
A convoy of security vehicles brought in fresh troops and ammunition on Tuesday morning.
A line of ambulances was parked at the perimeter of the battle zone.
Late on Monday night officials at Damman Central Hospital said about 30 Saudi police officers, including some critically wounded, had been admitted.
Also on Monday a security official said one of the two insurgents killed on Sunday was No. 3 on the Most Wanted list.
He was identified as Zaid Saad Zaid al-Samari, 31, a Saudi sought in connection with the numerous terror attacks launched in the kingdom since May 2003.
The shootout caused the US Embassy to close the American consulate in Dhahran, 20km southwest of Dammam, on Monday.