Saudi security forces shot dead a suspected militant who tried to detonate explosives outside a mosque in the Qatif region in eastern Saudi Arabia, where many Shi'ite Muslims live, the interior ministry said on Wednesday.
"The man was shot outside a mosque in the town of Um al Hamam and died while being transported to the hospital. He had explosive materials in a bag," an interior ministry spokesman was quoted as saying by Saudi state news agency SPA.
Police found a Pakistani residency card on the man, the statement said.
There was no immediate claim of responsibility for the attempted attack on Tuesday but the militant Islamic State group has carried out several deadly shootings and bombings, many targeting Shi'te mosques and security personnel.
Islamic State is bitterly hostile to Gulf Arab monarchies and is seen to be trying to stoke Sunni-Shi'ite sectarian confrontations in Arabian peninsula states to destabilise and ultimately overthrow their dynasties.
The interior ministry said on Wednesday that a Saudi citizen and a Syrian man seized at a checkpoint in the eastern city of Dammam in August with explosives on them had planned to bomb a restaurant on the island of Tarot.
"Elements of Daesh abroad instructed them to carry out a suicide attack targeting the cafe in Tarot but the help of God and the vigilance of the security forces prevented this," said the statement using an Arabic language acronym for Islamic State.
In July, suicide bombers struck three cities across Saudi Arabia, killing at least four security officers. The apparently coordinated attacks came on the penultimate day of the Muslim holy month of Ramadan.