One day in 2012, Aileen Rizo, a math consultant in the Fresno, California, education system, overheard a recently hired male colleague talking about his salary. Rizo was “floored,” she said, to learn that although she had the same job title as he did, was better educated, and had more experience, he was paid more. After asking around, Rizo learned that this was no coincidence: Several of her male colleagues were earning significantly more than her as well.

“I felt like I was part of a picture and someone cut me out of the picture,” she said, describing what it was like to realize she was being paid so much less. “It was almost surreal.”

Still, Rizo figured it was a mix-up that could be remedied. When she complained to Human Resources, though, she was told that the county had relied on her contract with her previous employer—she’d been a schoolteacher in Arizona—to set her pay. “I thought it was being used to confirm my employment and years of experience,” she said. “I didn’t know they were using the number for my salary.” When the county refused to change her pay, Rizo sued, saying the policy discriminated against women. In April 2017, the U.S. Court of Appeals for the Ninth Circuit ruled against her, saying that companies could use prior salary to determine wages as long as it “was reasonable and effectuated a business policy.”

There is nothing new about using previous salary information to set pay. “That’s been around probably as long as the job interview,” said Deborah Vagins, a senior vice president at the American Association of University Women. In a survey earlier this year, 80 percent of hiring managers and recruiters said they relied on past salary to come up with an offer. It might seem like a neutral practice, but it can perpetuate the inequities that mean women and people of color are paid less, on average, than white men. Even women fresh out of college make less than their male peers in their first jobs. If future pay is based on previous earnings, then the original sin of an initial hire taints a woman’s entire working life. “If this disparity can begin from the moment you go to your first job, and it follows you throughout your career, it will never be rectified, and the wage gap itself will never be rectified,” the District of Columbia’s Representative Eleanor Holmes Norton, a leading advocate to end the practice, told me.

The laws place the responsibility for ensuring fair pay where it belongs: not on women and people of color, but on the employers who perpetuate inequality.

Rizo wasn’t the first woman to challenge salary-history policies in court. In 2000, 37 female employees at Boeing’s Puget Sound headquarters filed a class action lawsuit against the company, alleging that its use of pay history to determine their salaries was among the factors that stopped them from advancing within the company. (Boeing settled the suit and agreed to use new methods to determine starting salaries.) Within the last few years, the issue has made its way into legislatures. In 2016, Massachusetts became the first state to forbid employers from requesting salary histories before they make an official job offer. Since then, Connecticut, Delaware, Oregon, Vermont, and Rizo’s home state of California have all passed similar laws, while versions have been introduced in Maine, New York, and Washington, D.C., New York City and Salt Lake City have passed their own bills. Major corporations have joined in: Amazon, American Express, Bank of America, Facebook, Google, Starbucks, and Wells Fargo have all announced that they will stop using prior pay to set compensation.