Image copyright Getty Images

Two former employees of Twitter have been charged in the US with spying for Saudi Arabia.

The charges, unsealed on Wednesday in San Francisco, allege that Saudi agents sought personal information about Twitter users including known critics of the Saudi government.

Court documents named the two as Ahmad Abouammo, a US citizen, and Ali Alzabarah, from Saudi Arabia.

A third person, Saudi citizen Ahmed Almutairi, is also accused of spying.

The New York Times says it is the first time that Saudi citizens have been charged with spying inside the United States.

What are the charges?

Ahmad Abouammo appeared in a Seattle court on Wednesday and was remanded in custody pending another hearing due on Friday.

He is also charged with falsifying documents and making false statements to the FBI.

The criminal complaint says he provided the FBI with a falsified, back-dated invoice charging an unnamed Saudi official $100,000 for "consulting services".

Mr Abouammo is said to have left his job as a media partnership manager for Twitter in 2015.

Mr Alzabarah, a former Twitter engineer, is accused of accessing the personal data of more than 6,000 Twitter users in 2015 after being recruited by Saudi agents.

One of the Twitter accounts he allegedly accessed also appeared in a note found in a Saudi official's email account, revealing the level of detail Mr Alzabarah was able to obtain about the user.

According to the complaint, the note read: "This one is a professional. He's a Saudi that uses encryption... We tracked him and found that 12 days ago he signed in once without encryption from IP [redacted] at 18:40 UTC on 05/25/2015. This one does not use a cell phone at all, just a browser. He's online right using Firefox form [sic] a windows machine."

Mr Alzabarah was confronted by his supervisors and placed on administrative leave before fleeing to Saudi Arabia with his wife and daughter, investigators said.

The charges allege the third person - Mr Almutairi - acted as an intermediary between the two Twitter employees and Saudi officials.

Mr Alzabarah and Mr Almutairi are both believed to be in Saudi Arabia.

The Saudi government allegedly paid the men hundreds of thousands of dollars. One man also received a luxury Hublot watch, worth about $20,000 (£15,500).

A key US ally

In a statement, Twitter said it recognised "the lengths bad actors will go to" to try to undermine its service.

It added: "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."

Video caption Why do Trump's Saudi job numbers keep growing?

Saudi Arabia is a key US ally in the Middle East.

President Donald Trump has maintained close ties with the kingdom despite international condemnation following the murder of dissident journalist Jamal Khashoggi last year.

Mr Khashoggi was murdered during a visit to the Saudi consulate in Istanbul.