And the law will require equal pay not just for workers whose jobs are alike, but also for those whose work is of “comparable character” or who work in “comparable operations.” Workers with more seniority will still be permitted to earn higher pay, but the law effectively broadens the definition of what is equal work.

Other states have also been stepping up their protections. In May, Maryland passed a law that requires equal pay for “comparable” work, and California last year enacted a law that is one of the nation’s strictest, requiring employers to be able to prove that they pay workers of both genders equally for “substantially similar” jobs. It, too, had the backing of important local trade groups, including the California Chamber of Commerce.

And Massachusetts joins at least 12 other states that already require companies to let employees compare notes about how much they are paid.

The distinguishing feature in the Massachusetts law is that job seekers will no longer be compelled to disclose their salary or wages at their current or previous jobs — which often leaves applicants with the nagging suspicion that they might have been offered more money if the earlier figure had been higher. People will still be allowed to volunteer their salary information.

“This is a sea change, and we hope it will be used as a model in other states,” said Victoria A. Budson, executive director of the Women and Public Policy Program at Harvard’s Kennedy School of Government and chairwoman of the Massachusetts Commission on the Status of Women. The law in her state, she said, “will help every single individual who applies for a job, not just women.”

Efforts to pass a national anti-secrecy law, the Paycheck Fairness Act, have been repeatedly blocked by congressional Republicans. Opponents, including the U.S. Chamber of Commerce, a powerful business lobbying group, say that such laws would increase litigation and unfairly restrict employers’ compensation decisions.