A Saudi man opened fire with a machine gun after storming an education office in the kingdom's south-western province of Jizan, killing six employees, state media reported.
Initial reports said the attacker was a teacher. Officials did not confirm later if he was a teacher, referring to him as simply as the gunman. The suspected shooter was arrested.
Two people were injured in the attack, Saudi television Al Arabiya reported.
Authorities opened an investigation into the incident, treating it as a criminal, the broadcaster said, citing spokesman for the Interior Ministry Mansour al-Turki.
The gunman shot randomly as he was on his way to meet the office's head, according to Al Arabiya.
The motive for the attack was not immediately clear. But a local official in the Saudi Red Crescent told state-run newspaper Alriyadh that the attack followed a quarrel inside the office.
Carrying guns is not common in the oil-rich kingdom.
In recent months, Saudi Arabia has seen several deadly attacks on the mosques of its minority Shiite community claimed by the radical Sunni Islamic State.