Washington, DC (CNN Business) Federal prosecutors accused two former Twitter employees of spying on behalf of Saudi Arabia on Wednesday.

Ali Alzabarah, a Saudi national, and Ahmad Abouammo, a US citizen, used their access at the social media giant to gather sensitive and nonpublic information on dissidents of the Saudi regime, the Justice Department alleged in a criminal complaint.

The case, unsealed in San Francisco federal court, underscores allegations the Saudi government tries to control anti-regime voices abroad. It also recalls a move reportedly directed by the country's controversial leader to weaponize online platforms against critics.

The accusations are certain to renew scrutiny of tech companies' abilities to protect the privacy of their users.

"The criminal complaint unsealed today alleges that Saudi agents mined Twitter's internal systems for personal information about known Saudi critics and thousands of other Twitter users," US Attorney David Anderson said in a statement. "U.S. law protects U.S. companies from such an unlawful foreign intrusion. We will not allow U.S. companies or U.S. technology to become tools of foreign repression in violation of U.S. law."

Read More