When Mitt Romney said he ordered up “binders full of women” to diversify his cabinet, he was making a last-minute effort to reverse a political fact of life: if he continues to perform as badly with female voters as polls show he has been, he will lose the election.

It isn’t the first time the former Massachusetts governor has faced this problem. In fact, in his first two runs for office, he faced similar issues connecting with women. But as his 2002 campaign for governor entered its final days, Romney made a concerted play for women voters against Shannon O’Brien, a Democrat vying to become the commonwealth’s first female governor. He succeeded enough that he won in one of the nation’s most liberal states, and any Democrats now delighting in making their own “binder full of women” Tumblr would be best advised to learn from the past.

Women tend to vote in larger numbers than men and favor Democrats, so the task for Romney has always been to drag down his opponent’s share of the female vote just enough to let the natural Republican advantage with male voters put him over the top—a difficult task for someone who at the very least has been to the right of his opponent on reproductive rights (how exactly far to the right has been a matter of interpretation, and of course, shifting explanations).

In 1994, in his first run for office against Sen. Ted Kennedy, Romney found himself getting flayed on the only real record he had, one that continues to dog him to this day—his time at Bain Capital. Then, Kennedy ran an ad knocking Romney for not hiring enough women when he was an executive at the company.

Romney was faced with a barrage of ads, which, according to The Boston Globe, misrepresented the paper’s own report “to contend that Romney had hired only one woman among 40 top managers.”

“Further,” the paper wrote, “the ad claimed that Romney’s explanation for the shortage of women was that ‘there aren’t enough women to recruit who are qualified.’ The on-screen notation was worse: ‘Romney claims ‘only a handful of women’ meet his recruiting standard.’”

Bain pushed back, saying that there were 12 women among the company’s 46 employees, and that there were in fact only eight executives in all (and that only one was female). Romney responded, too, lamenting that venture capital is “a profession that has yet to attract many women and minorities,” but insisting that Bain was “an organization completely open and accepting to women’s contributions.”

As the ad was running, Romney also went on the offensive, unveiling a proposal before a roomful of female executives that would require all publicly traded companies to disclose data on what their female employees earn.

“In my view, the best way to break the glass ceiling is to make sure we can see where it is, and if I am your United States senator, I am going to get a spotlight on it. I’m going to get out the hammer, and we’re going to break it,” Romney said, according to a newspaper account.

And as he did at the debate this week, Romney brought up the idea of flexible working hours for parents, promising that he would push for a national commission to investigate ways to help employees balance work and family.

“We have got to find a way to make sure we can draw on all of the talent and all of the skills and all of the abilities of parents in the workplace while at the same time not sacrificing the nurturing and care of our next generation,” he said then.

Kennedy, though, hammered Romney on the issue, at one point gathering 50 prominent female supporters to denounce Romney on the steps of Boston’s City Hall. Kennedy went on to beat the Republican by 17 points, and it was almost entirely due to female voters—despite drawing even with men, he lost the women vote to Kennedy by 24 points.

In 2002, Romney was set to face similar problems. He helped push out Republican governor Jane Swift, a former lieutenant governor who had become the first female head of Massachusetts when her boss took a job with the Bush administration. Although her sagging poll numbers made the push more of a nudge, Swift had planned to run for reelection before Romney got involved. Her tearful speech when she announced she was dropping out became one of the indelible images of the campaign.

With Swift out of the picture, Romney faced Shannon O’Brien in the general election. It was clear from the start that women would again be the deciding factor, and so Romney chose Kerry Healy, the state Republican Party chairwoman, as his lieutenant governor, a move that political analysts at the time said was designed explicitly to blunt O’Brien’s appeal.

At first, it didn’t go well. Polling soon after Swift dropped out showed that 62 percent of Massachusetts voters blamed her withdrawal on Romney. Before O’Brien had even emerged from of the Democratic primary, polls showed that just 28 percent of women voters favored Romney.

In a September radio interview, coming a few days after he had hosted a Women for Romney luncheon with 500 supporters, Romney appeared to conflate O’Brien and Swift, saying that electing O’Brien would be “a continuation of the way business is done with someone who’s been up there” and arguing that he, on the other hand, would be “somebody entirely new that comes with a different leadership experience.”

“I think it’s dangerously close to implying that all girls are alike,” O’Brien responded. “And someone who has just had a number of women endorsing his candidacy, who has tried to appeal to the women’s vote, needs to understand that comments like that can be taken the wrong way.”

Later, she went further, calling Romney’s attempt “to lump all women together … pretty insulting to women,” according to an Associated Press account.

The press piled on.

“Every woman—liberal, conservative, Republican, Libertarian, Democrat or Green—knows what it feels like to be run over by a man with Romney’s air of entitlement,” wrote a Boston Globe columnist.

By early October, Romney was still trailing O’Brien by 18 points among female voters. His campaign launched what several press accounts described as a “gushy” advertisement, featuring the candidate and his wife Ann talking about their courtship, and included footage of Romney in a bathing suit playing with his sons.

The ad was pulled after being criticized for being over the top, but Romney, who had been named one of People magazine’s “Fifty Most Beautiful People” during the campaign, invited reporters along as he jogged by the Charles River, accompanied by his dog. The move was again seen as an effort to woo female voters, and led a Democratic Party spokeswoman to quip, “What is he running for—prom king or governor?”

Close observers will notice that the Romney who shows up at presidential debates is different than the candidate who appeared on the stump for the past year, or at the Republican debates in primary season. It is not just what he says, it is how he says it—his voice softer now, less strident, like a pediatrician speaking to a stubborn child.

At first, Romney tried the same tact in his debates with O’Brien.

“Romney seemed to be aiming for a more genial approach, a tactic for softening his image among women who distrust his conservative positions on social issues,” The Boston Herald wrote of an early encounter between the candidates, one that it claimed was “the end-game race for the crucial women’s vote.”

“And perhaps mindful of the public perception perils of appearing to attack a woman, Romney stuck to milder forms of criticism like mentioning—but not excoriating—O’Brien’s pension record as treasurer.”

But Romney was called a “wimp” or worse by political observers, and was getting hammered by O’Brien’s relentless attacks. So he tried a new tack—focusing on bread-and-butter economic issues as an appeal to women and rolling out another proposal to track hiring among women. This time, in October 2002, he told the Boston Club, an organization of executive and professional women, that he would give 50 percent of the top-level positions in his administration to women, and suggested that the Securities & Exchange Commission insist that companies report the number of women and minorities by pay grade.

“Women would see Pepsi with one woman and Coke with 20 and they would buy Coke,” Romney suggested.

When the two debated again, Romney took a new, more aggressive approach, twice telling O’Brien that her slashing attacks were “unbecoming.”

Romney later walked back the comments, which were mocked at a fundraiser the next day by the likes of Hillary Clinton and Teresa Heinz Kerry.

O’Brien didn’t do herself very many favors. At a late debate, when asked why a teenager needed parental consent to get a tattoo but not to have an abortion, she had no answer, asking instead if moderator Tim Russert would like to see her tattoo.

And her own attacks blunted enthusiasm for her.

“At the beginning, she had the women’s vote and was holding her own with the men because of her fiscal experience,” the director of the UMass Center for Women in Politics and Public Policy told a local newspaper in a postmortem. “By the last week of the campaign, Romney had raised doubts about her ability as treasurer and her ‘aggressiveness’ helped her lose the men entirely and a lot of women.”

In the end, Romney ended up losing to O’Brien by only 9 points among women, and beating her among 18- to 25-year-old women by double digits.

The comparison between 10 years ago and now is far from exact. But it shows that the situation he now faces is not an unfamiliar one to Romney—and one he has conquered before.