WASHINGTON (Reuters) - The U.S. Consumer Financial Protection Bureau (CFPB) has agreed to enforce data-collection requirements that aim to guard against discriminatory lending practices after being sued by a Washington-based advocacy group, the group said on Wednesday.

Democracy Forward sued the agency in May 2019 alleging it had flouted laws introduced following the 2007-2009 financial crisis that require it to collect and disclose data on lending to women-owned, minority-owned and small businesses.

Under the settlement filed in the U.S. District Court in the Northern District of California, the CFPB agreed by September to outline a proposed rule for collecting the data and to create a panel of small-business advocates to feed in to the process.

The settlement marks a rare victory for consumer groups which have been fighting to protect a number of fair-lending laws, including those aimed at ethnic minorities, students and veterans, which they say are being eroded by the Trump administration.

A CFPB spokeswoman declined to comment, but in November the agency’s director, Kathy Kraninger, hosted a symposium to explore how it could spur lenders to disclose more data about small business lending and said she supported the aim of the law.

Data gathered by the nonpartisan association the National Community Reinvestment Coalition in 2014 identified major barriers to women- and minority-owned small businesses lending.

Women-owned firms had a loan approval rate that was 15% to 20% lower than that of their male counterparts, while 23% of nonminority-owned firms received loans compared with 17% of minority-owned firms, the study found. Better data would make it easier to identify the obstacles such groups face when trying to access credit, said Democracy Forward.

Under its Obama-era leadership, the CFPB failed to immediately implement the anti-discriminatory rule but had created a Consumer Advisory Board to start assessing how it should be drafted and enforced. The Trump administration’s interim CFPB director, Mick Mulvaney, who is now the president’s acting chief of staff, subsequently dismantled the board.

Democracy Forward sued the CFPB on behalf of the California Reinvestment Coalition and the National Association for Latino Community Asset Builders, as well as two women business owners.

The joint settlement agreement was submitted to the Court on Wednesday, Feb. 26. The agreement is subject to final Court approval, Democracy Forward said.