ALL of a sudden, or so it seems, the gripping yarn that was the Republican presidential primary is running out of plot twists. After victories in Wisconsin, the District of Columbia and Maryland this week, the once inevitable nomination of Mitt Romney looks inevitable once again, freeing him to swivel his big guns back in the direction of Barack Obama. The Republicans say that the vicious primary has turned Mr Romney into a better and battle-hardened prospect for the White House. Maybe it has. But in one vital respect, the challenge mounted by Rick Santorum has weakened Mr Romney. By dwelling so much on social and especially sexual issues, Mr Santorum may have helped to make the whole Republican Party look hostile to women.

Since women vote in larger numbers than men, this is a big problem (bigger even than the alienation of Hispanics, another group mightily displeased by the Republican primaries). Nor is it an entirely new one. Democratic presidential candidates have outpolled Republicans among women for two decades. But in recent months the gap has widened. In March a Pew survey found Mr Romney level-pegging with Mr Obama among men, but trailing the president among women by fully 20 points (38% to 58%). The same poll reported that women preferred Mr Obama over Mr Santorum by an even bigger margin (61% to 35%). And a USA Today/Gallup poll this week said that in 12 swing states more than 60% of women under 50 preferred Mr Obama. Mr Romney was down to 30%, 14 points lower than the month before.

Such numbers must be treated with care. The aggregates mask significant details. For example, Mr Obama's lead comes mainly from young women; the over-65s are evenly divided, says Pew. It is also a mistake to assume that women's preferences are driven only by hot-button issues such as abortion and contraception, which Mr Santorum has driven so unhelpfully up the news agenda. Polls show that women lean towards the Democrats for many other reasons. They are, for instance, likelier to believe in activist government and stronger regulation. On abortion, it turns out, men and women have similar attitudes. Just over half of both sexes think it should be legal in all or most cases, and about 43% think it should be illegal in all or most cases.

Yet it is hard to believe that the Republicans' problem with women has not been aggravated by Mr Santorum's obsession with who is doing what to whom in the bedroom, or by Mr Romney's promise to defund Planned Parenthood, the organisation on which millions of poor women depend for family planning (including abortion), or by the antics of Republican state legislatures. In recent months newspapers have carried startling reports about Republican-governed states pushing women who seek early abortions to have a probe inserted into their vaginas, in order to provide an image of the unborn child, in the hope that the picture will change their minds. The lowest moment in the primary sex wars came when Rush Limbaugh, a radio jock with huge influence inside the Republican Party, said on air that a young woman who wanted her (Catholic) university's insurance plan to cover contraception was a “slut”. He apologised, but not before his loud mouth gave new ammunition to the Democrats who accuse Republicans of waging war on women.

Might the politics of women change if more women were in politics? Even now, fewer than two out of ten members of Congress are female. For this, women have only themselves to blame. Plenty of research shows that women who stand for election do just as well as their male counterparts: they raise as much money, scoop up as many votes and are no less likely to win. The problem, according to a recent study and survey by Jennifer Lawless of American University and Richard Fox of Loyola Marymount University, is that so few choose to run. Even though a record number are running for the Senate, women are competing in fewer than a third of congressional races this year.

If you can't take the heat, you stay in the kitchen

In short, what women mainly lack is political ambition. Perversely, a decade of high-profile role models has done nothing to make a political career more alluring. If anything, the experiences of the likes of Hillary Clinton, Sarah Palin and the former House Speaker, Nancy Pelosi, appear to have produced the opposite effect. If the survey of nearly 4,000 well-qualified men and women is to be believed, the treatment meted out to these women confirmed the fears of others about venturing into the snake pit of politics. Two out of three of those surveyed thought that Mrs Clinton and Mrs Palin were the victims of sexist media coverage, including excessive reporting on their appearance.

The authors of the survey identify another half-dozen reasons for the relative reluctance of women to compete. These range from the psychological (women are more risk-averse, less competitive and less likely than men to believe that they are qualified) to the economic: women in America still do most of the child care and household work.

Two women who are not running for elected office will nonetheless play a big part in the forthcoming election. One is Ann Romney. Though suffering from multiple sclerosis, the Republican front-runner's wife has spoken impressively at many campaign events, to which she brings the warmth and spontaneity that her awkward, robotic husband finds so difficult to convey. In the Democratic camp, likewise, Michelle Obama is often spoken of, sotto voce, as the emotionally fluent “secret weapon” of a president whose flashing smile has failed to smother an impression of Olympian aloofness. It is perhaps a pity, and certainly an irony, that in an election where women's issues have become so prominent the leading female roles will go to loyal wives who are not on the ballot themselves.

Economist.com/blogs/lexington