Facebook Inc. said it filed lawsuits in Europe and the U.S. to prevent the unauthorized use of automation software on its platform and on Instagram.

One lawsuit was filed in Spain against MGP25 Cyberint Services, which provided automated software to distribute fake likes and comments, Facebook said Thursday in a press release. Facebook also filed suit in San Francisco federal court against Mohammad Zaghar, who operated a service that asked users for login credentials to scrape their data from the Facebook platform, the company said.