RIYADH - A Saudi policeman was killed in a clash with a man armed with a machinegun who took three workers hostage near Riyadh, the state news agency SPA reported Monday.

Security forces came under heavy fire when they responded to the hostage-taking on Sunday night in Rawdhat Sider, in the Mujamma region close to the capital, it said. The gunman, whose motives were not disclosed, was wounded and arrested, and the hostages were released, SPA said. Also on Sunday, a second member of the security forces was killed in a Shia area, official media said. SPA said a soldier was fatally wounded as officers came under attack from “an unknown gunman firing from farms” near Awamiya in eastern Saudi Arabia. Awamiya, just west of Dammam city on the Gulf coast, has witnessed clashes between security forces and protesters from the minority community.

Saudi Arabia, which is taking part in US-led air strikes against the Islamic State militant group in Syria, last week announced the arrest of three suspected IS supporters over a November 22 incident in which a Danish national was shot and wounded in Riyadh.