PHILADELPHIA (AP) — Despite a threat from cable giant Comcast to take legal action, Philadelphia has banned employers from asking potential hires to provide their salary history, a move supporters say is a step toward closing the wage gap between men and women.

Democratic Mayor Jim Kenney signed the measure on Monday, and said he’s confident the bill can withstand legal challenges.

“I know that Comcast and the business community are committed to ending wage discrimination, and I’m hopeful that moving forward we can have a better partnership on this and other issues of concern to business owners and their employees,” he said. “This doesn’t need to be an either/or argument — what is good for the people of Philadelphia is good for business, too.”

Comcast and the city’s Chamber of Commerce have said the law goes too far in dictating how employers can interact with potential workers.

The City Council unanimously passed the ordinance in December. Supporters contend that since women have historically been paid less than men, the practice of asking for a salary history can help perpetuate a cycle of lower salaries for women, continuing throughout their careers.

Women in Pennsylvania are paid 79 cents for every dollar a man earns, according to a 2015 Census Bureau report. For black and Hispanic women, the pay gap is even wider.

Democratic City Councilman Bill Greenlee, who sponsored Philadelphia’s bill, said he was inspired by a Massachusetts pay equity bill signed into law last summer that included a ban on asking for salary history.

“It’s reasonable to think if you take this question out of the equation it could help lessen wage inequality, and it’s worth a chance,” Greenlee said. “We’re trying to ensure fairness.”

However, Comcast and the Chamber of Commerce see the bill as yet another hassle in bringing business to Philadelphia.

“The wage equity ordinance as written is an overly broad impediment to businesses seeking to grow their workforce in the City of Philadelphia,” Rob Wonderling, president and CEO of the Philadelphia Chamber of Commerce, wrote in an opinion piece to a city business journal this month, adding it “infringes upon an employer’s ability to gain important information during the hiring process.”

Comcast had urged the mayor to veto the bill or face legal challenges, according to a legal memo obtained by The Philadelphia Inquirer earlier this month. The memo said the law would violate employers’ First Amendment rights to ask potential hires about their salary history.

Comcast referred questions to the Chamber of Commerce for this story. Neither responded to requests for comment after the mayor signed the bill.

David Cohen, a senior Comcast vice president, told the newspaper on Jan. 10 the bill was stoking frustrations in the city’s business community about increased regulations coming from City Hall. He said the policy doesn’t make sense in “corporate America” and pondered how companies would know what to pay top executives without past salary knowledge.

Since the Massachusetts bill was signed, similar legislation has been picking up speed around the country, said Maya Raghu, director of workplace equality at the National Women’s Law Center in Washington, D.C.

“For lawmakers, it is something that you can easily understand, thinking back to your first jobs and how those salaries impacted you,” she said.

Similar salary history bans have been introduced in New Jersey, and the city councils of New York City and Pittsburgh as well as the District of Columbia. In November, New York City stopped asking applicants for municipal jobs what they currently earn, and earlier this month Democratic New York Gov. Andrew Cuomo signed an executive order banning state entities from asking about pay history. Democrat Eleanor Holmes Norton, the District of Columbia’s delegate to Congress, has sponsored similar legislation in Congress.

The Greater Boston Chamber of Commerce ended up backing the Massachusetts legislation after lots of meetings and some tweaks to the bill, said Jim Rooney, president and CEO of the group. Employers are allowed to ask candidates what their salary expectations are, and candidates are free to reveal their past salary, as with the Philadelphia bill.

“‘What are your salary expectations?’ is a powerful question, and it lets you be within law,” he said.

Victoria Budson, executive director of the Women and Public Policy Program at the Harvard Kennedy School, says many steps are needed in order to close the wage gap, including educating employees and employers and understanding what a job is worth in a particular labor market.

“This provision won’t close the wage gap, but it’s an important piece in helping close it,” she said. “You’re not allowed to ask someone’s marital status or if they are planning to have children. We have a long standing history of things not to ask an employee. This would just be one thing added to that.”

Copyright 2017 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.