FILE PHOTO: Facebook logo is seen at a start-up companies gathering at Paris' Station F in Paris, France on January 17, 2017. REUTERS/Philippe Wojazer/File Photo GLOBAL BUSINESS WEEK AHEAD

(Reuters) - Facebook Inc FB.O has signed an agreement with the state of Washington to stop third-party advertisers in the United States from excluding protected groups from seeing their ads, the Washington State Attorney General said on Tuesday.

Facebook confirmed the agreement with the state, and said the announcement is part of a long process to ensure that tools used to target ads on the social network are safe, civil, and fair.

“We’ve removed thousands of categories related to potentially sensitive personal attributes — like race, ethnicity, sexual orientation and religion — from our exclusion targeting tools,” the company said, pointing to its efforts from over a year-and-a-half.

The legally binding agreement with Washington state requires Facebook to make the changes to its ad platform within 90 days, Washington Attorney General Bob Ferguson said. (bit.ly/2Lj5AxT)

“Facebook’s advertising platform allowed unlawful discrimination on the basis of race, sexual orientation, disability and religion,” Ferguson said.

The agreement concludes a 20-month investigation by Ferguson’s office that began after non-profit ProPublica published an article on Facebook’s advertisement targeting, Ferguson said.

“Discriminatory advertising has no place on our platform, and we’ll continue to improve our ad products,” Facebook Vice President of state and local policy Will Castleberry said.