Three of the five suspected militants killed by troops in Riyadh on Monday were on Saudi Arabia's most wanted list, the Saudi interior ministry said.
Security forces were engaged in a two-hour shoot-out
The ministry said one of those killed was Fahd Faraj al-Juwair, the alleged leader of al-Qaeda in Saudi Arabia.
Juwair and another two of the men took part in the foiled suicide bomb attack on the major oil-processing facility at Abqaiq on Friday, it added.
The attack was the first direct assault on Saudi oil production.
It was stopped when guards fired on cars packed with explosives trying to ram the gates.
At least one of the vehicles blew up, killing the occupants. Two guards were also killed, and another two wounded.
Following the attack, Saudi security forces surrounded the five men in a villa in an eastern suburb of Riyadh. Shots were fired and grenades thrown.
An interior ministry statement named four of the dead men as Juwair, Ibrahim al-Mutair, Abdullah al-Shammari and Jaffal Rafi al-Shammari.
The fifth man is yet to be identified.
Of those killed, Juwair, Mutair and Abdullah al-Shammari were on the list of 36 most wanted al-Qaeda linked militants issued by the Saudi authorities in June.
Born in al-Zulfi, the 36-year-old Juwair was number two on the list.
He reportedly took over the leadership of al-Qaeda in the Arabian Peninsula in July after Younis al-Hayari, a Moroccan, was killed in a shootout in Riyadh.
Juwair undertook the attack on Abqaiq with Abdullah al-Shammari and Jaffal al-Shammari.