NEW YORK – For years, this column has highlighted the dearth of women on corporate boards and in executive positions. It has suggested all sorts of ways for investors and others to encourage — even force — more diversity on boards, and raised pointed questions about why there are so few women in those roles.

And so the news Sunday that California passed a law mandating that every publicly traded company based in the state will need at least one woman on the board by the end of 2019 — and as many as three by 2021 — would seem like a welcome development.

While California’s impulse is clearly on the right side of history, the way the rule was enacted is so misguided that it might do more harm than good.

Worst of all, an onslaught of lawsuits challenging the rule could set back the meaningful progress that has been made — and hopefully will be made — in bringing more diversity to boardrooms.

There are better ways to make progress. More on that in a moment.

The most serious issue is that California’s law could turn out to be unconstitutional. The state Legislature’s own analysis warned that it “would likely be challenged on equal protection grounds, and the means that the bill uses, which is essentially a quota, could be difficult to defend.”

Gov. Jerry Brown understood the possibility that the law could create a legal backlash — and signed it anyway.

“There have been numerous objections to this bill, and serious legal concerns have been raised,” Brown wrote in his signing message. “I don’t minimize the potential flaws that indeed may prove fatal to its ultimate implementation. Nevertheless, recent events in Washington, D.C. — and beyond — make it crystal clear that many are not getting the message.”

Brown has sent a message, but the problems begin with the letter of the law and get worse from there.

Technically, because most large publicly traded companies based in California are chartered in other states, the law might not be applicable to them. A company is governed by the laws of the state — Delaware, for example — where it is incorporated.

Even for companies that are fully based in California, the number of new female board members that the law would mandate is small. Joseph Grundfest, a professor at Stanford who has for years been an advocate for increasing women and minorities on boards, said he believed the law would apply to only about 72 companies that are chartered and have headquarters in the state.

“It would, at most, increase the number of women directors at the Fortune 500 by a grand total of one,” Grundfest said, reiterating a point he made in a paper he wrote assessing its effect. He said the only major company affected would be Apple, which has two women on its eight-member board and would be required to add another by the end of 2021.

Smaller companies, Grundfest said, could have to add as many as 208 women over the next three years, which, while not insignificant, is still only a tiny percentage of all public companies. And he believes that’s a generous estimate.

In a theoretical sense, Grundfest said, he was in favor of the law. “But this is the wrong way,” he said. “I fear the cure is worse than the disease.”

The law — or, more accurately, the raft of lawsuits it will most likely inspire — could have a chilling effect on genuine efforts by boards to seek more balance. Challenges to the law could make ever-cautious corporate legal departments reluctant to have company leaders publicly state diversity goals, for fear that those statements would be interpreted as quotas.

And while research has shown that companies with more diverse boards perform better, legal challenges to the law could take aim at those studies. The state itself, referring to three studies it used to make its case for the legislation, raised that as a red flag.

“While these studies establish a relationship between the proportion of women on corporate boards and these outcomes, it is important to note that such studies are observational in nature and do not necessarily provide evidence for a causal relationship,” a report commissioned by the state said.

While those studies have been widely accepted among academics and professionals, the law’s opponents will have plenty of motivation to challenge them, undercutting what have long been among the most persuasive arguments for adding women to corporate boards. And there has been research questioning the claims of such studies.

“Despite advocates’ insistence that women on boards enhance corporate performance and that diversity of task groups enhances their performance, research findings are mixed, and repeated meta-analyses have yielded average correlational findings that are null or extremely small,” Alice Eagly, a professor at Northwestern University, wrote in a study titled “When Passionate Advocates Meet Research on Diversity, Does the Honest Broker Stand a Chance?”

Finally, there is a practical issue: When a Norwegian law that forced corporate boards to have at least 40 percent female representation took effect in 2006, performance suffered because of the abrupt change in the composition of the boards, according to a 2010 study by the University of Michigan.

“The quota led to younger and less experienced boards,” the authors concluded, “and a deterioration in operating performance.” The study suggested that performance had suffered not as a result of gender, but more because of the upheaval that boards experienced in an effort to comply with the law. That could be a fair cost for accelerating progress, but some investors may struggle to appreciate that point.

And the truth is that there is a much more effective way to create progress that doesn’t require new laws.

Investors, big and small, can use their influence to press corporate boards to diversify. Firms like BlackRock and pension funds like CalPERS, the California Public Employees’ Retirement System, are already working to effect change. BlackRock has told companies that it wants to see at least two female board members at the companies it invests in. CalPERS wrote to 504 companies in 2017 asking them to improve diversity, and has voted against directors at companies that have failed to respond to its requests. Hopefully, the constant drumbeat on this topic will only drive additional responsible companies to make progress.

Yes, it is slow. And there seem to be hurdles at U.S. companies that feel much higher than at European companies, which are far ahead of us on this.

Increasing diversity of all kinds was always going to be a journey. We will get there. But let’s not do anything to unintentionally set it back.