Last week, New York City Mayor Bill DeBlasio signed a new law banning employers in New York City from asking prospective employees about their salary history. The law amends the New York City Human Rights Law, making it an illegal discriminatory practice for an employer to inquire about or use an applicant’s “current or prior wage, benefits or other compensation” to set a salary offer during hiring.

Mayor DeBlasio said the law is intended to help close the wage gap for women and people of color, by preventing employers from relying on their previous salaries in setting new salary offers. The City’s Public Advocate says the wage gap costs women $5.8 billion in earnings each year. “It is unacceptable that we’re still fighting for equal pay for equal work. The simple fact is that women and people of color are frequently paid less for the same work as their white, male counterparts,” said DeBlasio.

Under the law, employers may not ask applicants or their previous employers for their salary histories, search public records for salary histories, or rely on an applicant’s salary history when making an offer of employment. The New York City Commission on Human Rights will be charged with enforcing the new law, and will have the power to impose fines ranging from $125 to $250,000.

The law takes effect on October 31, 2017.