The embattled political consulting firm Cambridge Analytica announced on Wednesday that it would cease most operations and file for bankruptcy amid growing legal and political scrutiny of its business practices and work for President Trump.

The decision was made less than two months after the firm and Facebook became embroiled in a data-harvesting scandal that compromised the personal information of up to 87 million people. Revelations about the misuse of data, published in March by The New York Times and The Observer of London, plunged the social media giant into crisis and prompted regulators and lawmakers to open investigations into Cambridge Analytica.