Three Saudi border guards have been killed and three others wounded in attack near the kingdom's frontier with Iraq, the interior ministry has said.
Four "terrorists" opened fire on the guards after being spotted crossing the border near Judayyidat Arar in Northern Borders province at dawn, a spokesman told the official SPA news agency.
Two of the assailants were shot dead, while the others detonated explosive belts they were wearing, he added.
No group has claimed responsibility.
However, Saudi Arabia has joined the US-led coalition against Islamic State (IS) and its warplanes jets are conducting air strikes on the jihadist group's positions in Syria, along with three other Arab states.
The Saudi interior ministry reported initially that only two border guards and two assailants died in Monday's attack. However, it later raised the death toll to seven.
The ministry's spokesman told SPA that the guards had been patrolling the Saudi frontier at around 04:30 (01:30 GMT) when they intercepted the four men trying to enter from Iraq.
"The terrorists opened fire and the patrol responded accordingly. As a result, one of the terrorists was killed while another terrorist detonated an explosive belt he was wearing when the patrol tried to convince him to surrender himself," the spokesman said.
The two others tried to flee into Wadi Arar, but were surrounded.
"The patrol called on them to surrender, but one of them blew himself up while the other was killed by security men," the spokesman added.
After searching the scene, the guards reportedly recovered automatic weapons, pistols, hand grenades and explosive belts, as well as money.
The ministry spokesman said the commander of the border force in the area, Brig Gen Oudah al-Balawi, was among the guards who were killed.
Saudi Arabia's heavily-defended 1,200km (745-mile) border with Iraq has come under mortar fire on previous occasions, but more direct assaults are rare.
The kingdom deployed thousands of extra troops along the frontier in July after IS seized large swathes of territory in Iraq and Syria.
In November, Saudis living nearby were asked to relocate for at least a year to allow a 20km (12-mile) buffer zone to be created.
Judayyidat Arar is close to the border with Iraq's western province of Anbar, parts of which are controlled by IS and its Sunni Arab allies.