Apple and Thailand's Digital Ministry did not immediately respond to a request for comment.

Prajak Kongkirati, a political scientist at Bangkok's Thammasat University, said he had received two emails from Apple warning it believed his iPhone and iCloud accounts had been targeted, along with a "threat notification" on his Apple account.

Researcher Sarinee Achananuntakul and Thai activist Yingcheep Atchanont of Legal Monitoring group iLaw said they had received similar emails, while a rapper, a political activist, and a politician opposed to the government separately posted screenshots of the same email on their social media accounts.

All are perceived as being critical of the Thai government.

The messages warned "if your device is compromised by a state-sponsored attacker, they may be able to remotely access your sensitive data, communications, or even the camera and microphone."

Two political activists in Ghana, an opposition politician in Uganda, as well as a dozen journalists from Salvadoran media reported later on Wednesday having received similar warning messages from Apple, according to social media posts reviewed by Reuters.

Apple on Tuesday filed a lawsuit against Israeli cyber firm NSO Group and its parent company OSY Technologies for alleged surveillance and targeting of U.S. Apple users with its Pegasus spyware. [L4N2SE31T]

In a statement on Tuesday, Apple said that the NSO group had created "state-sponsored surveillance technology" that had been aimed at "very small number of users".

It was not immediately clear in Apple's alerts on Wednesday whether the company believed Thais were being targeted by Pegasus.

Internet security watchdog group Citizen Lab identified in 2018 a Pegasus spyware operator active within Thailand.

Thailand's government is still led by the architects of a 2014 coup, who remain in power after a 2019 election that its rivals say was stacked in the military's favour.

Prime Minister Prayuth Chan-ocha, the coup leader, has denied allegations the military changed rules to ensure it remained in control. He has faced months of anti-government protests.

As well as calls for greater democracy, the government has also been criticised over its management of the coronavirus pandemic and the economy.

(Reporting by Panu Wongcha-Um and Fanny Potkin; Editing by Ed Davies)

By Panu Wongcha-um and Fanny Potkin