WHEN those TV ads tell us that a career in the Forces is an exciting prospect we will, from now on, have no trouble believing them. A female fighter pilot has put her pounds 3 million skills on hold to drop a baby instead of bombs, taking with her the anonymous ill-will of her male colleagues. Meanwhile, we are treated to the Full Monty on the relationship between Lieutenant-Colonel Keith Pople and his comrade-in-arms Lieutenant-Commander Karen Pearce. There's more to come: the first case of alleged discrimination brought by a gay soldier will be heard in the European Court of Human Rights this autumn.

The sex wars are among the most difficult the armed forces have to fight. Their job is to defend the realm and not to give young people a fun career in exotic parts of the globe, so any change in recruitment policy - whether of women or gays - which impedes operational efficiency must be rejected. But where there is no conscription the army, air force and navy must attract recruits like any other employer and cannot escape the flow of civilian life.

The latest advert showing a woman soldier approaching a terrified rape victim in some Bosnian hell-hole. "The last thing she wants to see is a man," reflects the army's shift away from identifying itself as a killing machine. It emphasises the humanitarian side of its work, its role as peace-keeper and enforcer of international settlements.

Anyone who joins the military must be prepared to kill for their country. But in modern warfare, the unpleasant business of dispatching enemies in hand to hand combat is increasingly the preserve of special forces. The all-male SAS may still get the gory glory, but the stars of the show, in the Gulf War, Bosnia and Northern Ireland have been the strategists and logistics units, the reconnaissance engineering and signals ensembles and military intelligence. These are jobs which require team-work, but not the same kind of team-work as it takes to lie in a fox-hole together waiting for the order to kill the people in the next trench with bayonets fixed.

So-called "surgical" warfare is no less cruel than hand-to-hand combat, but it is a different way of fighting which requires different abilities. Women possess these as much - and often more - than men. Flight Lieutenant Jo Salter, the pregnant bomber pilot, will have done intensive testing of her hand-to-eye-co-ordination. The rough and ready assessment used to involve throwing a ball hard and fast at a potential recruit. Women performed less well then men. A bright officer had the idea of changing the exercise to threading a needle - a better test of precision. If you think women are bad at catching balls, you should see grown men trying to get that fuzzy bit of thread through the tiny eye of a 2mm object. Let's just say a camel has a better chance.

So the recruitment of women is not a generous gesture towards sex equality, but a matter of hard necessity. Indeed, as the performance of boys at school falls in comparison to that of girls, patterns are likely to shift further towards women. Which brings us to sex. Men and women trapped together without their families and in situations which are by turns tense and boring, are more likely to succumb to the temptation of adulterous or promiscuous relations than people who work structured days and return to their partners by 7pm.

One idea we will hear more of in the wake of the Pople-Pearce case is segregation. Senior figures in the navy are keen on separate ships for women. This would be a giant step backwards. The policy of open access for women to any job they can do as well as men should not lead to isolation from their male peers. And in a culture historically unused to females - other than the odd 17th Century cross-dressing runaway - the worst way to encourage acceptance is to round up the womenfolk on what will certainly be known as the Good Ship Crumpet.

Although the armed forces needs women, it still tends to view them as potential problems, rather than assets. To that extent, their fate mirrors that of gays in the military. Yesterday the army denied a Sunday Times report that it was considering recruiting openly homosexual soldiers whose very presence, the former defence minister Nicholas Soames claimed "undermined morale, cohesion and effectiveness".

That wasn't true in the 4th century BC when the Theban army's best fighters were the special band of homosexual lovers who fought side by side to conquer the city states and were slaughtered, side by side, by Philip of Macedon's army. It hasn't been true through the centuries in which regiments accommodated gay men, knowingly or otherwise. It isn't true now.

Recent evidence suggests that it is full-blooded heterosexuals rather than their gay colleagues who have played fast and loose with sexual discipline. Lieutenant Col Pople follows in a long and distinguished line of military men whose regimental motto might have been amor vincit common sense: Sir Peter Harding wooing Bienvenida Buck, a phalanx of Bosnian heroes offering off-limit comfort to their interpreters, to say nothing of the murderous spree of the Cyprus squaddies. Might it be that a few gays in the ranks will calm them all down a bit?

The armed forces still recoil from admitting gays, its prejudices supported first by Tory minister and now, shamefully, by Labour ones. But one day soon, they will have to do so because its case against is so weak. It is perfectly reasonable to outlaw sexual relations between military personnel who work together: this should be enforced with equal rigour whatever the sexuality of the people involved. The real reason the top brass is so loathe to admit that homosexuals exist in the military, as everywhere else, is that senior officers prefer to pander to prejudice than to tackle it. To do so would demand courage and leadership. If you can't get that in the military, where can you?