The US Justice Department has charged three people, including two Saudis, with spying on Twitter users critical of the kingdom's royal family.
The trio worked to unmask the ownership details behind dissident Twitter accounts on behalf of someone prosecutors designated "Royal Family Member-1", which The Washington Post reported was Crown Prince Mohammed bin Salman, the kingdom?s de facto ruler.
Here is a look at how Saudi Arabia has cracked down on dissent and criticism on social media.
'Lord of the flies'
Saud al-Qahtani, the royal court's media czar and a close confidant of Prince Mohammed, has long elicited fear in the kingdom, earning nicknames such as "troll master", "Mr Hashtag" and "lord of the flies" for managing an electronic army to intimidate critics of the kingdom.
Qahtani was sacked over his suspected role in the murder of dissident journalist Jamal Khashoggi last year. He has not appeared in public since the murder and his whereabouts are unknown.
Last year, The New York Times reported that Qahtani spearheaded an official Saudi effort to harass and silence the kingdom's critics on Twitter by using troll farms.
Qahtani also "tried to buy tools that would let him ban Twitter accounts" of critics, according to a Bellingcat investigation.
In September, Twitter said it shut down thousands of accounts worldwide for spreading misinformation, including some artificially amplifying pro-Saudi messaging as part of a regional propaganda war.
It also shut down Qahtani's account, which had some 1.3 million followers.
Saudi Arabia has also deployed Twitter to go after governments critical of Saudi Arabia, including rival Qatar which has faced a Riyadh-led economic boycott since June 2017.
A bitter row erupted with Ottawa last year after an Arabic language tweet on August 5 from the Canadian embassy in Riyadh -- calling for the "immediate release" of activists jailed in the kingdom -- infuriated the Saudi government.
Saudi Arabia subsequently expelled Canada's ambassador and froze all new trade, in a clearly combative approach to international censure.
Multiple Western officials said Canada was asked to delete that tweet, which in Arabic is seen to have the potential to go viral in the kingdom, an absolute monarchy known for its tightly controlled public messaging.
While the message was also tweeted in English, a Western official said the Arabic version was interpreted locally as an attempt to "communicate directly" with Saudi people -- a serious infraction in the eyes of the kingdom.
Staying out of trouble
Saudi Arabia has more than 11 million Twitter users, according to marketing and research firm Talkwalker.
Around 70 percent of the country?s 34 million people are "active social media users", Talkwalker says.
But the crackdown on dissidents has prompted many Saudis to shut down their Twitter accounts -- including those engaged constructively in critiquing Prince Mohammed's reforms.
Growing nationalism also appears to be causing alarm.
In a televised debate last year, Shura Council member Abdallah al-Fawzan said Saudis had the right to brand someone a "traitor" if that person fails to defend the country or chooses to remain silent.
Saudi economist Essam al-Zamil was targeted by authorities last year after he tweeted criticism of the government?s planned public listing of state oil giant Aramco.
Zamil, "who had called into question Saudi projections of revenue from the Aramco initial public offering", is on trial for alleged membership of the Muslim Brotherhood, according to Human Rights Watch.
Wednesday's indictments of three people in the United States for spying on Twitter users critical of the Saudi royal family are the latest in a spate of allegations against the kingdom, which has long sought to stamp out online dissent