CAIRO — Days after Sudanese soldiers massacred pro-democracy demonstrators in Khartoum in June, an obscure digital marketing company in Cairo began deploying keyboard warriors to a second front: a covert operation to praise Sudan’s military on social media.

The Egyptian company, run by a former military officer and self-described expert on “internet warfare,” paid new recruits $180 a month to write pro-military messages using fake accounts on Facebook, Twitter, Instagram and Telegram. Instructors provided hashtags and talking points.

Since the ouster of President Omar Hassan al-Bashir in April, new employees were told, protesters had sown chaos in Sudan. Their demands for democracy were premature and dangerous. Order had to be restored.

“We’re at war,” an instructor told the new employees. “Security is weak. The army has to rule for now.”

Covert influence campaigns have become a favored tool of leaders in countries like China and Russia, where manipulation of social media complements strongarm tactics on the streets. In the Middle East, though, those campaigns are being coordinated across borders in an effort to bolster authoritarian rule and douse the kind of popular protests that gave rise to the Arab Spring in 2011.

The secretive Egyptian effort to support Sudan’s military on social media this summer by the company in Cairo, New Waves, was just one part of a much bigger operation that spanned the Middle East and targeted people in at least nine Middle Eastern and North African countries, according to Facebook.

The campaign was exposed on Aug. 1 when Facebook announced that it had shut down hundreds of accounts run by New Waves and an Emirati company with a near-identical name. Working in concert, the two companies used money, deception and fake accounts to leverage their audience of almost 14 million Facebook followers, as well as thousands more on Instagram.

In an interview, a Facebook spokesman said the company had not found sufficient evidence to link the operation to the governments of Egypt or the United Arab Emirates. But there were many hints of such a link.

The New Waves owner, Amr Hussein, retired from the Egyptian military in 2001 and described himself on his Facebook page as a “researcher on internet wars.” He is a vocal supporter of Egypt’s authoritarian leader, President Abdel Fattah el-Sisi, and has publicly campaigned in support of Mr. el-Sisi’s draconian crackdown on internet freedoms.

His company operates from a military-owned housing project in eastern Cairo where employees are warned not to speak to outsiders about their work.

Its messages are a mirror image of the foreign policy objectives of Egypt, the United Arab Emirates and Saudi Arabia — a powerful axis that has wielded immense influence across the Middle East since 2011, bolstering authoritarian allies or intervening in regional wars.

The internal workings of New Waves were described by four people with knowledge of the company who spoke on the condition of anonymity because of the sensitivity of the matter with the Egyptian authorities.

Image

Facebook said the Egyptian and Emirati companies worked together to manage 361 compromised accounts and pages with a reach of 13.7 million people.CreditStephen Lam/Reuters

Responding to Facebook’s accusations, Mr. Hussein, the owner of New Waves, called the company “liars” and denied any links to the Emirates. “I don’t know what you are talk about,” he wrote in a text message, calling Facebook “not fair.” He declined to comment further.

Two former New Waves employees did not respond to requests for comment.

Sudanese activists who noted a surge in pro-military social media activity over the summer said they were unsurprised to learn of the campaign.

“There have been so many fake accounts,” said Mohamed Suliman, a Boston-based engineer allied with Sudan’s protest movement. “Fake news is a real source of danger for Sudan. If there is ever a counterrevolution, one of the regime’s main tools will be social media.”

Facebook said the Egyptian and Emirati companies worked together to manage 361 compromised accounts and pages with a reach of 13.7 million people. They spent $167,000 on advertising and used false identities to disguise their role in the operation.

Their posts gave a boost to the Libyan warlord Khalifa Hifter, who counts Egypt and the United Arab Emirates among his staunchest allies, praised the United Arab Emirates and slammed the wealthy Persian Gulf state of Qatar, a sworn enemy of the Saudis, Egyptians and Emiratis.

Other messages talked up the Saudi-led war in Yemen and promoted independence for Somaliland — a key objective of the Emirates as it jockeys for influence and lucrative contracts in the Horn of Africa.

Image

A Saudi-led airstrike in Dhamar, Yemen, on Sunday. Some Facebook messages talked up the Saudi-led war in Yemen and promoted independence for Somaliland.CreditAgence France-Presse — Getty Images

The website of the Emirati company, Newave, which shut down after Facebook named it on Aug. 1, listed its business address as a government-owned media complex in Abu Dhabi.

A customer service agent at the complex, Twofour54, said Newave had a registered capacity of 10 employees and named its general manager as Mohamed Hamdan al-Zaabi. Emails and phone calls to the company went unanswered.

In Cairo, recruits to the New Waves operation targeting Sudan were told their job was to create “balance” between the military and protesters on social media.

“We’re doing something very big, very important here,” one trainer said. “In the past wars were conducted with weapons. Now it’s through social media.”

Egypt, Saudi Arabia and the United Arab Emirates were the main supporters of the Sudanese generals who seized power in April. The Saudis and Emiratis offered $3 billion in aid while Egypt provided diplomatic support.

Sudan’s vibrant social media space, though, has been harder to control.

Since the first protests against Mr. al-Bashir in December, protest leaders have used the internet to mobilize demonstrations, to circumvent official censorship and to attract support from global celebrities like the pop star Rihanna.

Image

Gen. Mohamed Hamdan and his notorious Rapid Support Forces paramilitary unit posted pictures on Facebook of him cooking and calling for higher wages for teachers, to soften his image.CreditAshraf Shazly/Agence France-Presse — Getty Images

Accounts run by Lt. Gen Mohamed Hamdan and his notorious Rapid Support Forces paramilitary unit showed him cooking meals and addressing rallies, highlighting his demands for higher teachers’ wages. Sudanese activists petitioned Facebook to shut down those accounts, accusing the company of giving a free platform to a potential war criminal.

Facebook declined to act because the Rapid Support Forces had become a “state actor,” a Facebook press officer said. General Hamdan is now a leading figure in the power-sharing government, which began taking shape this week with the formation of a new cabinet.

In April, however, Facebook investigators started to scrutinize New Waves as part of the tech giant’s global drive to shut down what it calls “coordinated inauthentic behavior” on its platform.

Sudanese democracy advocates had also noticed something awry: a stream of pro-military posts on Twitter written under false names, often using photographs of prominent activists or musicians. They identified the tweets as fake, they said, through Arabic language tics that suggested they had been written by non-Sudanese.

For example, tweets rendered the word “Sudan” in the feminine, while Sudanese write it in the masculine.

Image

A screen grab of the facebook page of Rapid Support Forces paramilitary unit in Sudan. A Facebook press officer said the company did not intend to take down the Rapid Support Forces pages because the group had become a “state actor.”Creditfacebook

The New Waves operation had echoes of the Egyptian state’s approach to controlling online debate. Under Mr. el-Sisi, Egypt has blocked over 500 websites and introduced laws that criminalize criticism of the government on social media, which Mr. el-Sisi has described as a threat to national security.

Online critics are frequently jailed in Egypt. On July 7, a dual American-Egyptian citizen, Reem Mohamed Desouky, was arrested on arrival at Cairo airport with her 13-year-old son. Officials confiscated Ms. Desouky’s phone, scrolled through her Facebook posts and charged her with using social media to undermine Egypt.

She is being held at Qanatir prison outside Cairo; her son has returned to the United States.

Between 2015 and 2017, Mr. Hussein, the owner of New Waves, wrote a column for al-Bawaba, a pro-military newspaper. Last fall he fronted a public awareness campaign warning Egyptians of the dangers of social media.

“From 2011 onward it’s been a war of social media,” Mr. Hussein said in an interview with a pro-state television channel in which he cited the Nazi dictum “the bigger the lie, the more people will believe it.”

Executives at New Waves and its Emirati sister company went to considerable lengths to hide their role in the Middle East influence campaign, Facebook said. They obtained fake accounts to administer Facebook pages that purported to be news sites about nine countries, including Sudan, Somalia, Kuwait and Libya.

The pages often featured genuine posts about real news or light entertainment items like cartoons, interspersed with fake items that followed a common theme.

The Sudan Alyoum (Sudan Today) Facebook page linked to a news website of the same name that published 17 articles between this May and August accusing the Muslim Brotherhood of conspiring to overthrow Sudan’s Transitional Military Council, and 60 other articles supporting General Hamdan’s leadership.

Facebook shared its findings with Twitter, which has taken down the New Waves account. Twitter declined to comment except to say it had removed several accounts related to Sudan.

In an interview in July, Mr. Hussein claimed New Waves had just one client, a state-run theater production called Opera Bent Araby. He is vocal about social media, he said, because Middle Eastern society is “special.”

“I talk about the dangers not only in Egypt — in all our world,” he said.

Last Friday, Mr. Hussein declined to speak further. “I have nothing for you,” he wrote in a text. “Please forget me.”

Follow Declan Walsh on Twitter: @declanwalsh.

Ben Decker contributed reporting from Boston.

A version of this article appears in print on , Section A, Page 1 of the New York edition with the headline: A Mission to Bolster Authoritarians, With Hashtags as Weapons. Order Reprints | Today’s Paper | Subscribe