PHILADELPHIA — 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 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 this month. The memo said the law would violate employers’ First Amendment rights to ask potential hires about their salary history.

Neither Comcast nor the chamber responded to requests for comment after the mayor signed the bill.