The Department of Justice announced on Thursday that it has charged three individuals with acting as spies for Saudi Arabia in a plot that included accessing and stealing the personal information of Twitter users.

The three men, two of whom were Twitter employees, are alleged to have targeted critics of Saudi Arabia, stolen their private information, and then sent it to the Saudi government, according to the DOJ.

"Acting in the United States under the direction and control of Saudi officials, the defendants are alleged to have obtained private, identifying information about users of Twitter who were critical of the Saudi government," Assistant Attorney General for National Security John C. Demers said in a statement. "Two of the defendants … are former Twitter employees who violated their terms of employment to access this information in exchange for money and other benefits. Aside from being criminal, their conduct was contrary to the free speech principles on which this country was founded."

The FBI, which helped uncover the plot, said it will continue to aggressively pursue individuals who spy on behalf of foreign governments on American soil.

"The FBI will not stand by and allow foreign governments to illegally exploit private user information from U.S. companies," FBI special agent in charge John F. Bennett said in a statement. "These individuals are charged with targeting and obtaining private data from dissidents and known critics, under the direction and control of the government of Saudi Arabia. Insider threats pose a critical threat to American businesses and our national security."

The three men—identified by officials as Ali Alzabarah, Ahmad Abouammo, and Ahmed Almutairi—are alleged to have stolen the information between November 2014 and May 2015. The DOJ said the information could have been used to identify and locate critics of Saudi Arabia.

"Almutairi, 30, of Saudi Arabia, and foreign officials of the Kingdom of Saudi Arabia convinced Abouammo and Alzabarah to use their employee credentials to gain access without authorization to certain nonpublic information about the individuals behind certain Twitter accounts," according to information provided by the DOJ. "Specifically, representatives of the Kingdom of Saudi Arabia and the Saudi Royal Family sought the private information of Twitter users who had been critical of the regime. Such private user information included their email addresses, phone numbers, IP addresses, and dates of birth. This information could have been used to identify and locate the Twitter users who published these posts."