We finally got it right in Illinois, though we took our precious time.

It took two hours of debate and a razor-thin vote, with just one “yes” to spare. But our state representatives on Wednesday finally agreed that women deserve equal rights and approved the Equal Rights Amendment. The vote came 46 years after the motion first died under the weight of then-House Speaker George Ryan’s opposing gavel.

EDITORIAL

It’s an embarrassment that it took so long for Illinois to catch up to three dozen other states on something this basic: One half of the American people deserve the same rights as the other half.

This time, thankfully, the paralyzing fear of unisex bathrooms  — they now exist, by the way, and the world is still spinning on its axis — and taxpayer-funded abortions didn’t swing more votes into the “no” column.

Those arguments, among others, held sway in the past. So when the ERA died here in 1982, so too did the national momentum for it. The deadline for ratification passed, and the ERA faded from public consciousness. Supporters periodically tried to revive it here, but fell short.  

But not this time. This time the moment was ripe. The #MeToo movement, not to mention the shame of an ongoing sexual harassment scandal in the Legislature, bore worthwhile fruit.

The ERA’s language is so straightforward, one wonders why it ever raised much of a fuss: “Equality of rights under the law shall not be denied or abridged by the United States or by any state on account of sex.”

If the amendment ever becomes part of the U.S. Constitution, it won’t end our problems with gender discrimination. But it will serve as a powerful symbol, and we have no doubt it will give victims of discrimination a stronger legal leg to stand on to seek redress. The symbolism and the practical ramifications — both matter greatly.

Sure, raw politics played a part here. Politics is always at least a sidecar of social reform. Legislators who said “yes” were well aware of how their vote will play in the November elections, especially among women voters.

But so what? Opponents of the ERA will play it for politics, too, with specious arguments about public restrooms and abortion that have nothing to do with a woman’s right to be treated equally.

That’s the key here: equality. And as we’ve seen with #MeToo, discrimination, harassment and unequal treatment are still very much with us, laws against them to the contrary. Women may no longer be relegated routinely to the secretarial pool instead of the executive suite, but gender discrimination is by no means a relic of the past.

Consider the 2016 presidential election. An infinitely qualified woman lost to a supremely unqualified and unfit man. Whatever else went on there, sexism did its dirty work.

Let’s acknowledge, though, that we’re dealing with a complicated issue. Gender disparities at work aren’t always due to discrimination. Take a recent University of Chicago study that found a gender pay gap among Uber drivers even though men and women drivers are paid at the same rate. The disparity in pay, as it turns out, has to do with the fact that male drivers tend work more hours, so they are more likely to learn the most lucrative tricks of the trade, and they drive faster, racking up more trips per hour. 

But why did the women drivers work less? There’s where the social bias comes in. They were more likely to cut their hours short or quit altogether to do a different job that our society traditionally assigns to women: taking care of the kids.

This time around, too, any movement to ratify the ERA once and for all must fully include working women and women of color, the waitresses and factory workers and office assistants who experience harassment and inequality more often than middle-class women and have fewer resources to fight back. Several legislators cautioned about this in Springfield. But let’s note: they still voted “yes.”

Illinois is now the 37th state to pass the ERA. One more state needs to ratify it, but there are potential roadblocks even then. Congress imposed a 1982 deadline to reach approval by 38 states, so a legal battle could be in the works.

Whatever happens, Illinois finally got it right.

Send letters to: letters@suntimes.com.