The Western-allied kingdom, the world's top oil exporter, has been hit by a spate of deadly shootings and bombings targeting security forces or its Shia Muslim minority since last year, many of them claimed by Islamic State.
Saudi state news agency SPA quoted an interior ministry spokesperson as saying that the officer, Colonel Kitab Majed al-Hammadi, was shot dead in the al-Arja area of al-Dawadimi province west of the Saudi capital.
Islamic State claims killing of retired Saudi officer
The spokesman said security authorities were investigating the killing.
Islamic State's Amaq news website said the group's Saudi branch, known as the Nejd Province, carried out the attack and identified Hammadi as the director of internal security in the al-Quwayiyah region.
Civilian shot dead in attack on police in Saudi cleric's village
Islamic State views Shias as heretics but is also bitterly opposed to Sunni Muslim Gulf Arab rulers and is seen to be trying to stir up sectarian strife on the Arabian Peninsula to bring about the overthrow of its ruling dynasties.
The Nejd Province group claimed responsibility on Sunday for an explosion next to a police station south of Riyadh that killed one person and damaged police vehicles.
Gunmen kill two Saudi policemen: police
In December, Saudi Arabia announced the creation of an "anti-terrorism" coalition whose members it said would share intelligence, counter violent ideology and deploy troops if necessary to combat extremists.
The kingdom is also part of the US-led coalition bombing IS in Iraq and Syria.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ