BOSTON -- For nearly two decades, Dorothy Simonelli worked in the cafeteria at Everett High School. She and her colleagues cooked turkey and big vats of pasta and made their own sauce.

When the cafeteria workers asked for a raise, their request was denied.

"Management said...they're just women, they're working for pin money, money for jewelry," recalled Barbara Rice, a union representative at the time.

In 1989, the cafeteria workers sued. They argued that the female cafeteria workers were earning less than the male custodians, in violation of Massachusetts' equal pay law. A ruling in their favor was overturned by the Supreme Judicial Court in 1998, which found that the positions were not considered comparable, so there was no requirement for equal pay.

On Monday, Simonelli and Rice watched Gov. Charlie Baker sign a law updating Massachusetts' equal pay law to better define comparable work and to put in place other protections to ensure that women are paid equally for equal work.

"There are no words," said Simonelli, now 83. "I just feel so wonderful. I'm so happy for my coworkers and all the ones that have passed on."

The new law updates Massachusetts's equal pay law, which was passed in 1945. The 1945 law was the first in the country to require comparable pay for comparable work. A federal equal pay law was passed in 1963.

The new law will prohibit employers from requesting salary history during a job interview -- although a job applicant can voluntarily disclose that information. It says businesses cannot forbid workers from discussing their salaries with each other. It provides a clearer definition for what criteria employers can use to determine what is "comparable work."

It extends the statute of limitations for bringing an equal pay claim from one year to three years.

The bill also includes provisions sought by businesses. For example, if an employer does a self-evaluation to determine whether there are compensation differences then takes steps to eliminate them, the employer will be protected from equal pay lawsuits for three years.

The bill passed both the House and the Senate unanimously. It goes into effect Jan. 1, 2018.

Supporters of the new law cite a study showing that women working full time in Massachusetts earn 82 cents for every dollar men earn.

Lt. Gov. Karyn Polito said she has been lucky to get paid equally to men, working in her family's real estate business, then making the partnership track at a Worcester law firm. But, Polito said, "It shouldn't take luck for a working woman in this commonwealth to feel she has access to a level playing field."

Despite many of them having worked until after midnight closing out this year's legislative session, a number of legislative leaders spoke to a crowd of women's rights advocates and business leaders who attended the bill-signing ceremony.

"Pay equity gets to the heart of who we are as Americans," said House Speaker Robert DeLeo, D-Winthrop.

Some noted that there is more work to be done. Senate President Stan Rosenberg, D-Amherst, used the occasion to advocate for the institution of paid family leave in Massachusetts. The Senate passed a paid family leave bill at the end of the legislative session, but without enough time for the House to take it up.

After Rosenberg said the state must implement paid leave, he looked over at DeLeo and Baker. "I just wanted to check to see if the speaker and the governor were applauding," Rosenberg said.

State Sen. Pat Jehlen, D-Somerville, a sponsor of the pay equity bill, said more work must be done to improve pay in fields that tend to be dominated by women, such as caring for children, seniors or people with disabilities, or making and serving food. "Our work is not done until those in the caring professions are paid what their work is really worth," Jehlen said.

Despite remaining obstacles, lawmakers cheered the bill as a major step forward for women and their families. "Today in Massachusetts, we can say equal pay for equal work is not just a slogan," Jehlen said. "It's the law."