Facebook Inc. must defend itself in a District of Columbia lawsuit accusing the social network of failing to safeguard users' personal data and allowing a U.K. political consulting firm to mine the information for the benefit of Donald Trump's 2016 presidential campaign.

The decision on Friday by D.C. Superior Court Judge Fern Saddler adds to the pressure on the company to change how it handles subscribers' personal information. Facebook has said it may cost as much as $5 billion to resolve a Federal Trade Commission probe of its privacy practices. The Menlo Park, California-based company also faces a consumer class action over those practices and investigations in several states.

Facebook had argued the court should stay the matter because of other cases, but it now needs to produce documents for the D.C. judge.