The mayor said he wants to end the “cycle of discrimination.”

Anyone who applies to work in New York City government won’t have to worry anymore about providing a salary history.

On Friday, Mayor Bill de Blasio (D) issued an executive order that bans city agencies from asking about a job applicants’ prior compensation until after a conditional job offer, including a salary offer, is made. They will also be prohibited from searching public records for information on salary, benefits, or other forms of compensation, and can only ask about it after the fact to verify prior employment. The policy goes into effect 30 days from Friday.

The mayor says the move is meant to ensure fairness in the city’s hiring process and to close the wage gap for women and people of color. Across the country, both groups are paidless than white men, gaps that emerge at the very beginning of workers’ careers. Gaining more education doesn’t solve the problem, as both women and people of color make less than their white male peers at every educational level. Women of color experience the largest gaps.

If a future salary is based off of past compensation that potentially had discrimination baked in, it will be harder to close those gaps.

“As the employer of over 300,000 City workers, I have a responsibility to lead the way in putting an end to that cycle of discrimination,” de Blasio said in a statement. “Women and people of color constitute the majority of our City workforce and a large share of the people of working age in this city. It’s essential to the success of our local government and our city as a whole that everyone is treated — and paid — with the fairness and respect they deserve.”

The mayor’s administration says the new policy can serve as a model for other employers, including those in the private sector, who could implement a similar ban voluntarily.

de Blasio also announced that he supports pending legislation that would ban the use of salary histories citywide, both in the public and private sector. In August, the city’s Public Advocate Letitia James unveiled legislation that would bar employers from asking about or looking into job applicants’ prior compensation. That bill is still pending.