Saudi Arabia banned the unauthorised use of drones on Sunday, just a day after security forces shot down a recreational drone near the king's palace in the capital Riyadh sparking rumours of a coup attempt.

The kingdom's interior ministry instructed drone enthusiasts to obtain permissions to fly the devices until regulations were finalised, noting a law for the use of drones was in its final stage.

The ministry called on users to retrieve the necessary police clearance to use the devices "for particular reasons in permitted locations", state news agency SPA reported.

The announcement came after a toy drone was flown over a palace triggering heavy gunfire in the capital's Khozama district on Saturday. It sparked fears of a possible coup attempt.

But the government ruled out any major security breach, adding that an investigation had been launched into the incident.

No casualties were reported in the incident, a senior Saudi official told Reuters, noting King Salman was not present in the palace at the time.

Security around the royal palaces appears to have tightened in recent months as powerful Crown Prince Mohammed bin Salman oversees landmark social and economic reforms to prepare for a post-oil era, despite the risk of riling religious hardliners.

Saudi Arabia is also embroiled in a long running conflict in its southern neighbour Yemen, dubbed by the United Nations as the world's worst humanitarian crisis.

At least 10,000 civilians have been killed in the war, with the country facing a cholera epidemic and on the brink of famine.

Last October a gunman shot dead two Saudi guards and wounded three others at the gate of the royal palace in the Red Sea city of Jeddah, according to the interior ministry.

Royal guards killed the gunman, identified by the ministry as a 28-year-old Saudi national armed with a Kalashnikov and three grenades.