Facebook is seeking unspecified damages and restitution.

Facebook Inc. sued two Android app developers for allegedly planting malware that robotically clicked on ads to inflate revenue.

Through a practice known as “click injection fraud,” one of the apps generated more than 40 million ad impressions and 1.7 million clicks through Facebook’s Audience Network over a three-month period at the end of last year, according to a complaint filed Tuesday in San Francisco federal court.

Facebook has came under intense scrutiny over the use of private data and the impact of harmful content on its more than 2 billion users, with governments around the world challenging its policies. Meanwhile, the company is fighting back against commercial exploitation of its social networks, suing firms in China and New Zealand that it claims artificially inflate “likes” and “followers” on Instagram accounts.

The developers named in Tuesday’s suit are JediMobi Tech Ltd. of Singapore and LionMobi Holding Ltd. of Hong Kong. JediMobi made the math app Calculator Plus; LionMobi, the utility program Power Clean. Facebook alleges the malicious code was installed onto people’s mobile phones through the apps.

“At times, the malware was delivered in the form of ‘updates’ to the apps and, after October 2018, the malware was included directly in the apps,” according to the complaint.

“LionMobi has long adhered to the Facebook advertising policy and has never obtained any illegal income by so-called click injection fraud,” the company said in an emailed statement, adding that it investigates and removes anything from third parties that it suspects may violate Facebook policies. JediMobi didn’t respond to requests for comment.

Facebook says it discovered the phony ad clicks in December and disabled the apps and banned the developers from the network. It also said it repaid advertisers who paid for phony clicks.

Facebook is seeking unspecified damages and restitution.