Two websites carried a statement on Tuesday attributed to the "Al-Qaida Organisation in the Arabian Peninsula" outlining how the attack was thwarted.
The group "was tipped off by elements within the Saudi security service about an impending attack against the mujahidin, who were in a public place in Al-Rabwa neighbourhood of Riyadh", the statement said.
The alleged assault was supposed to take place on Friday night, said the statement, which was posted on www.alpalsam.com and a Yahoo message board.
"On the basis of this information, the mujahidin evacuated the place and went to a safer spot," said the statement, which hailed "the security service members who cooperate with Al-Qaida".
Saudi forces have repeatedly clashed with suspected al-Qaida sympathisers in the past months as they hunt for presumed members of the network.
Hundreds of suspected Islamists have been rounded up since last May's triple bombings of residential compounds in Riyadh which killed 35 people.
A car bomb went off at another expatriate housing complex in the Saudi capital in November, killing 17 people, mostly Arabs.
In the last reported clash, Riyadh's police chief said security forces had arrested "a number of suspects" after a shootout with two gunmen in the Saudi capital on Sunday.