A security officer has been killed by an armed man holding three labourers hostage in Riyadh after police tried to free the captives, authorities in Saudi Arabia say.

The labourers were freed and the hostage-taker was later arrested, a Saudi police statement on Sunday’s incident said. No immediate word was given on the man's identity or his reasons.

"An unknown man carrying an automatic weapon took three labourers hostage near al-Hamoud mosque ... and threatened to shoot passers-by," state news agency SPA quoted a Riyadh police spokesperson as saying in a statement.

"When police surrounded him and asked him to drop his weapon, he opened fire heavily."

The security officer was killed in the exchange of fire and two people, including a civilian, were wounded, the spokesperson said.

The attacker was wounded and arrested.

Saudi officials are concerned about the rise in domestic armed groups this year due to conflicts in Iraq and Syria. The government has declared tough penalties for what its calls terrorist crimes.

Police reported earlier on Sunday that unidentified attacker killed a member of Saudi Arabia’s security forces beside a village where unrest among the country’s Shia minority has been focused.

Source: Reuters