Interior Ministry spokesman Mansour al-Turki said three Saudis and four Syrians had been detained following two raids carried out in the northern city of Arar, the official SPA news agency reported.
He said that a cache of weapons had also been seized.
At least three border guards, including a commanding officer, were killed in a Monday gunfight with a group of individuals trying to cross the border from Iraq into Saudi territory.
The attack came shortly after an Iraqi military official told The Anadolu Agency that Iraqi border guards had managed to repel an assault by ISIL militants on a border checkpoint.
Saudi Arabia is a member of an international, U.S.-led coalition that has carried out more than 1,200 airstrikes against ISIL targets in Iraq and Syria since last August, according to a joint task force leading the air operations.
Along with Saudi, the alliance also includes France, Germany, the United Arab Emirates and Jordan, among others.