DUBAI, Jan 9 (Reuters) - Saudi Arabia has arrested three Saudi nationals and four Syrians over links to a suicide bombing and gun attack on the kingdom's border with Iraq, the first ground assault by militants on the frontier in years.

On Monday, militants killed two Saudi border guards and their commanding officer on the frontier with Iraq, the interior ministry said, in an assault one analyst called Islamic State's first assault on the kingdom.

On Friday, state news agency SPA quoted an interior ministry spokesman as saying three of the four attackers - who were all killed during the raid - were Saudi nationals and described them as members of the "deviant group", a phrase authorities have used to describe al Qaeda.

Security forces also seized weapons including AK47 automatic guns, hand grenades, explosive belts and cash including Iraqi and Syrian bank notes, from the scene where the attack took place. Seven people - three Saudis and four Syrians - have been arrested, he added.

No group claimed responsibility for the assault in a remote desert area next to Iraq's Anbar province, where the Islamic State militant group is fighting Iraqi army forces backed by Shi'ite Muslim militias, who are close to Riyadh's foe Iran.

The four raiders shot at a border patrol on Monday morning near the city of Arar and when security officers responded, one of the attackers was captured and detonated an explosives belt and was killed.

Another attacker who was shot during an initial exchange of fire near the Suweif border post was also killed as were two other militants as they were trying to escape.

Saudi forces have joined U.S.-led air strikes against Islamic State positions in Syria.

The Sunni Islamist movement, which has declared its own caliphate and wants to redraw the map of the Middle East, has called for "lone-wolf" attacks against Saudi security forces, the Shi'ite Muslim minority and foreigners.

Islamic State sees Saudi Arabia's links to the West as a betrayal of Islam. Riyadh, which sees itself as a champion of Sunni Islam, has mobilised conservative Sunni clergy to describe the ideology of the al Qaeda offshoot as deviant.

Saudi Arabia boosted its security on the frontier with Iraq in July, adding thousands of troops to back up a border guards force, after Islamic State seized swathes of territory in Iraq including in Anbar province. (Reporting by Rania El Gamal)

Our global editorial team of more than 50 journalists and about 250 freelancers covers the world’s under-reported stories at the heart of aid, development, women’s and LGBT+ rights, human trafficking, property rights, and climate change.