Saudi Arabia is urging people to report subversive social media activity via a phone app, part of an apparent crackdown on potential government critics before demonstrations called for by exiled opposition figures.
A message sent on a Twitter account run by the interior ministry late on Tuesday called on citizens and residents to monitor each other for what it called "information crimes".
"When you notice any account on social networks publishing terrorist or extremist ideas, please report it immediately via the application #We're_all_security", it said, referring to a mobile phone app launched last year to enable civilians to report traffic violations and burglaries.
Hours later, the public prosecutor tweeted a section of the kingdom's terrorism law which states: "Endangering national unity, obstructing the Basic Law of governance or some of its articles, and harming the state's reputation or status are terrorist crimes."
Exiled Saudi critics have called for demonstrations on Friday to galvanise opposition to the royal family and at least a dozen prominent clerics, intellectuals and activists, including prominent Islamist cleric Sheikh Salman al-Awdah, have been detained this week, activists say.
Protests are banned in Saudi Arabia as are political parties. Unions are illegal, the press is controlled and criticism of the royal family can lead to prison.
Riyadh says it does not have political prisoners, while top officials have said monitoring activists is needed to maintain social stability.
The detentions reported by activists follow widespread speculation, denied by officials, that King Salman intends to abdicate to his son, Crown Prince Crown Prince Mohammed bin Salman, who dominates economic, diplomatic and domestic policy.
It also coincides with growing tensions with Qatar over its alleged support of Islamists, including the Muslim Brotherhood which is listed by Riyadh as a terrorist organisation.
Some Twitter users expressed support for the government's approach, using the "We're all Security" hashtag.
"No flattery, no silence whether for a relative or friend in securing the homeland," said one. "Defend your security. Chaos starts with calls for freedom and reform. Do not believe them."
The government has not clearly acknowledged this week's detentions or responded to requests for comment.
But state news agency SPA said on Tuesday authorities had uncovered "intelligence activities for the benefit of foreign parties" by a group of people it did not identify.
A Saudi security source told Reuters the suspects were accused of "espionage activities and having contacts with external entities including the Muslim Brotherhood", which Riyadh has classified as a terrorist organization.
The government toughened its stance on dissent following the Arab Spring in 2011 after it averted unrest by offering billions of dollars in handouts and state spending.
But the Brotherhood, which represents an ideological threat to Riyadh's dynastic system of rule, has gained power elsewhere in the region.
Since the kingdom's founding, the ruling Al Saud family has enjoyed a close alliance with clerics of the ultra-conservative Wahhabi school of Islam. In return, the clerics have espoused a political philosophy that demands obedience to the ruler.
By contrast the Muslim Brotherhood advances an active political doctrine urging revolutionary action, which flies in the face of Wahhabi teaching.
The Brotherhood-inspired Sahwa movement in the 1990s agitated to bring democracy to Saudi Arabia and criticised the ruling family for corruption, social liberalisation and working with the West, including allowing U.S. troops into the kingdom during the 1991 Iraq war.
The Sahwa were largely undermined by a mixture of repression and co-optation but remain active.
The al-Saud family has always regarded Islamist groups as the biggest internal threat to its rule over a country in which appeals to religious sentiment cannot be lightly dismissed and an al Qaeda campaign a decade ago killed hundreds.
Saudi Arabia, the United Arab Emirates, Bahrain and Egypt cut diplomatic and transport links with Qatar in June over its alleged support for Islamist militants, a charge that Doha denies.
(Editing by Timothy Heritage)