What just happened? Two former Twitter employees have been charged with spying on behalf of Saudi Arabia, the Department of Justice (DoJ) announced on Wednesday. The pair allegedly used their positions at the company to access the private information of users who were critical of the country's government and royal family.

Ahmad Abouammo, a US citizen who left Twitter in May 2015, was arrested on Tuesday. Ali Alzabarah, a Saudi citizen, fled the US a day later after being confronted. A third individual, Saudi citizen Ahmed Almutairi, acted as an intermediary between Saudi officials and the Twitter employees, writes the Washington Post. He is also charged with spying.

According to a complaint filed in the U.S. District Court in San Francisco, the three men allegedly accessed the information at the request of Saudi official Bader Al Asaker, who operated a charity belonging to Saudi crown prince Mohammed Bin Salman.

Alzabarah is accused of accessing the personal information of more than 6,000 Twitter accounts in 2015 on behalf of Saudi Arabia. These included journalist Omar Abdulaziz, who was close to murdered Washington Post columnist Jamal Khashoggi.

Some of the accessed user data included IP addresses, devices, and browsers associated with accounts, which could have been used to track movements. While some of these accounts might have been considered security threats as they contained images such as explosive devices, and were removed after takedown requests from the Saudi government, most were merely critical of Bin Salman, the government, or the royal family.

"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," said U.S. Attorney David L. Anderson. "We will not allow U.S. companies or U.S. technology to become tools of foreign repression in violation of U.S. law."

In a statement to Gizmodo, a Twitter spokesperson said: "Our company limits access to sensitive account information to a limited group of trained and vetted employees."

"We understand the incredible risks faced by many who use Twitter to share their perspectives with the world and to hold those in power accountable. We have tools in place to protect their privacy and their ability to do their vital work. We're committed to protecting those who use our service to advocate for equality, individual freedoms, and human rights," they added.