New York City employers will be barred from asking prospective hires to disclose their past salary history under a measure passed Wednesday by the City Council that looks to address wage disparities between men and women.

In a 47-3 vote, council members approved the bill — sponsored by Public Advocate Letitia James and Councilwoman Elizabeth Crowley (D-Queens) — that prohibits public and private sector employers from using an individual’s salary history to determine a new salary offer.

“Just one underpaid position can set an individual on a course of underpayment lasting their entire professional life,” City Council Speaker Melissa Mark-Viverito told the council as she brought the measure forward for a vote.

James and Crowley, citing studies showing women are typically paid less than their male counterparts, said the measure was needed to ensure women are not underpaid.

“When women are paid less for equal work, one job to the next, not only are they cheated . . . they are proportionally cheated in their retirement benefits,” James said. “Improving the status of women has a lasting effect on all communities, including men, children and families . . . Individuals should not look at this as a women’s issue. This is an issue that affects all of us.”

James cited a study conducted by her office last April that found women in New York City earned a combined $5.8 billion less in wages than men in 2016.

A study released Tuesday by the National Partnership for Women & Families, a Washington, D.C.-based advocacy group, shows that women in New York State earn 89 cents for every dollar that men are paid. The pay gap is wider among minority women, the study found. Black women in New York earn 66 cents for every dollar paid to non-Hispanic white men. Latina women earn 56 cents.

“Stretched over a lifetime of work,” Crowley said, the gender pay gap “leaves women substantially more disadvantaged than the average man.”

The measure only applies to new hires, not to internal job candidates applying for a transfer or promotion given that their salary information may already be on file. It also excludes public employees whose salaries are determined by collective bargaining agreements.

James, speaking to reporters before the City Council meeting, acknowledged that some private sector business groups had expressed concerns about the measure to her office. She said “nonetheless” the Council was moving forward.

The city’s Commission on Human Rights will be tasked with enforcing the measure, James said. The commission will investigate complaints lodged against firms and has the authority to levy fines ranging from $125 to $250,000.