Third-party advertisers on Facebook are no longer allowed to exclude ethnic and religious minorities, immigrants, LGBTQ individuals, and other protected groups from seeing their ads in the state of Washington.

Washington Attorney General Bob Ferguson announced that Facebook signed an agreement today concluding the state’s 20-month investigation. Though Facebook put a general policy in place back in April, this deal makes it legally binding in the state of Washington.

After Facebook continued to drop the ball when it came to banning discriminatory advertisements, the Washington attorney general’s office launched an investigation into platform’s advertising system. It successfully created 20 fake ads that excluded ethnic minorities from viewing promotions for nightclubs, restaurants, lending, insurance, employment, and apartment rentals.

In 2016, ProPublica reported that it was able to buy housing ads on Facebook that excluded users of certain races and ethnicities from seeing them, which was a violation of the the Fair Housing Act of 1968. This law prohibits making, printing, or publishing any statement or advertisement “that indicates any preference, limitation, or discrimination based on race, color, religion, sex, handicap, familial status, or national origin.” The Civil Rights Act of 1964 also forbids the “printing or publication of notices or advertisements indicating prohibited preference, limitation, specification or discrimination” in employment recruitment.

Facebook said it would improve enforcement of its rules against advertisements that excluded racial and ethnic groups. However, a new report from ProPublica last November stated that it could still exclude certain users from seeing rental housing ads, including African-Americans, people interested in wheelchair ramps, and Jewish people. Following Facebook’s announcement that it would temporarily disable the feature, the Washington attorney general’s office began looking into the system.

Though the social media company believed its advertising platform “fully complie[d] with all applicable laws,” Facebook signed an “assurance of discontinuance” to the state and agreed to pay $90,000 to the attorney general’s office.

H/T Engadget