SAN FRANCISCO — Employers can legally pay women less than men for the same work based on differences in the workers’ previous salaries, a federal appeals court ruled Thursday.

The decision by the 9th U.S. Circuit Court of Appeals overturned a lower-court ruling that said pay differences based exclusively on prior salaries were discriminatory under the federal Equal Pay Act.

That’s because women’s earlier salaries are likely to be lower than men’s because of gender bias, U.S. Magistrate Judge Michael Seng said in a 2015 decision.

A three-judge panel of the 9th Circuit cited a 1982 ruling by the court that said employers could use previous salary information as long as they applied it reasonably and had a business policy that justified it.

“This decision is a step in the wrong direction if we’re trying to really ensure that women have work opportunities of equal pay,” said Deborah Rhode, who teaches gender equity law at Stanford Law School. “You can’t allow prior discriminatory salary setting to justify future ones or you perpetuate the discrimination.”

Activists held rallies around the country earlier this month on Equal Pay Day to highlight the wage gap between men and women. Women made about 80 cents for every dollar men earned in 2015, according to U.S. government data.