As the Taliban gunman hides from an approaching Apache attack helicopter, he may not care that the American aircraft is painted with chrome-free primer to reduce its environmental impact. Nor may he be impressed that the next generation of pilotless surveillance drones will be part-powered by solar energy.

The US military is rushing to embrace sustainability. Its primary motive is not ethical. It is trying to keep pace with China in a strategic race to harness clean energy. Any future conflict between superpowers will almost certainly feature eco-weapons and green tactics. The oil-burning Americans are starting to realise how badly they are lagging behind.

This emerging race presents eco-minded campaigners and technologists with a dilemma - should they welcome the huge budgets being committed? Should they, perhaps, even take the military dollar, or should they campaign against the uses to which it is being put?

China is already leaping ahead. The Beijing government is doubling its spending on green tech every year. Its budget is vast - at around $288m a day, according to a US Senate hearing in February. American commentators are beginning to warn how China sees this as a route to global primacy. Robert F Kennedy Jr, the environmental lawyer (and nephew of John F Kennedy), warns on his blog: "The Chinese are treating the energy technology competition as if it were an arms race . . . China will soon make us as dependent on Chinese green technology for the next century as we have been on Saudi oil." He concludes: "The arms race of the 21st century is already in progress."

Major General Zeng Fanxiang, deputy head of the Arms-Building Study Centre of the Chinese People's Liberation Army (PLA), declared in December: "Regarding weapons, we need to develop solar power, hydrogen, nuclear and other new energy resources." In a report posted on the Chinese ministry of national defence's website, he also predicted that climate change could alter the way battles are fought and called on the military to become more fuel-efficient.

Sun and sea

In response, the Pentagon is investing in solar technology and funding a major ocean-energy project. US military leaders hope that this surge will achieve energy security at home and abroad. It may also help the civilian sector to catch up with Chinese technology, which is devastating a domestic manufacturing sector that was gearing up to create thousands of jobs for the ailing US economy. In Britain, the promise of new green industries may be stifled at birth by Chinese dynamism.

Across the US, military bases are installing black-and-blue solar panels and other solar technology. Last year, Hill air force base switched on the largest solar panel array in the state of Utah. Green tech is also being harnessed to develop solar-powered battlefield radios, as well as tents with solar panels woven into their fabric to power military equipment.

Solar power and wind energy are, however, dependent on the weather and thus intermittent. No modern military wants to wait for a good breeze. So the US forces are being more ambitious. At a naval base on the Indian Ocean atoll of Diego Garcia, scientists are developing a system called Otec (ocean thermal energy conversion) - a way to produce power using warm and cold seawater.

Warm water is sucked from the surface and cold water from far beneath. The two streams are used to heat and cool a closed system containing a refrigerant-like ammonia that boils at room temperature. The cold water condenses it into a thick liquid, which is piped to the turbine; warm water then vaporises it into an expanding gas that turns the turbine's blades. Once this process is complete, cold water condenses the ammonia again.During the 1970s energy crisis, the Carter administration funded research into Otec, but Reagan abolished it. Trials have now started again.

President Obama understands its military potential. He has also promised to end US "foreign oil dependency", claiming that it can be used as a weapon that allows "unstable, undemocratic governments" overseas to wield "undue influence over America's national security". His case has been bolstered by Somali pirates. In late 2008, the hijack of the Sirius Star, a VLCC (very large crude carrier) holding two million barrels of oil, exposed America's vulnerability. If a 60-warship multinational force can't beat a group of brigands, imagine how easily China or a nuclear-armed Iran could block the west's supplies.

The technological challenges of Otec are huge. The projected cost of a plant that generates 100-200 megawatts - enough to power 50,000 homes - is $1.5bn. But the potential benefits are dizzying. The oceans could be harnessed as an immense solar-energy store. If the US navy can make it work, Otec could change the future of clean energy.

In April, the US navy declared that it will obtain half of its energy from alternative sources by 2020. It has been conducting flight trials of the Green Hornet, an F-18 fighter aircraft powered by a blend of camelina-derived biofuel and conventional jet fuel. It is the first aircraft to break the sound barrier on biofuel. The navy secretary, Ray Mabus, also announced that the "Great Green Fleet" - a carrier strike group that will use no fossil fuels - would launch by 2016.

The US army is auditing the greenhouse-gas emissions of each of its units. "We recognised that we were big emitters as well as big fuel users," said Jerry Hansen, the US army's senior energy executive in December. Once again, this isn't about protecting the environment so much as defending vulnerable supply lines.

“The more the military thinks about green technology, the more it sees how it goes hand in hand with improving operational effectiveness," Elizabeth Quintana, head of military information studies at Britain's Royal United Services Institute, told me. "Afghanistan is the principal driver for Nato nations. Resupply convoys can be eight miles long and they in effect say: 'Please hit me with a roadside bomb.' Up to 60 per cent of the convoys carry fuel and water. If you reduce that need for supply, you save lives. Forward-operating bases are increasingly using solar panels and wind turbines for sensors and radars. It saves troops from being predictable targets when they regularly refuel generators."

In February, the institute hosted an inter­national conference on military eco-efficiency. Quintana believes that the world's armed forces may prove the most efficient at speeding up green tech development: "The military can turn things around much faster than other government departments. Their get-things-done attitude may put them among the most forward-thinking organisations in this area."

Conflicting interests

Ecological activists are wary of welcoming the military into their climate camp. "There is an uncomfortable pragmatism with which we have to take these things," says Doug Parr, policy director of Greenpeace. "The military's technological advances can't be condemned out of hand. And it would be wrong to suppose that we could stop all military conflict. But if our government is serious about achieving fuel security, there are other things we could do that would be more strategically effective.

“If we want to reduce our dependence on imported energy," Parr continues, "then lagging our roofs should be more of a national security issue than having a more sustainable army. If we all had electric cars, we would not need warships patrolling our oil supply routes."

Alex Randall, of the Centre for Alternative Technology, is also sceptical. "The military is developing these technologies so that they can fight wars in a post-climate-change future. Such conflicts are likely to be caused by a lack of natural resources . . . We would rather that funds were concentrated on technologies and policies that prevent climate change, and which thus prevent conflicts from happening."

The world's armed forces are busily developing forms of green tech that will, no doubt, be devastating in their effects. The emergence of "low-ecological-impact" weapons is a case in point. British and American scientists are deve­loping reduced-toxin explosives and lead-free bullets that don't poison battlegrounds.

The eco-war scenario goes further. A PLA treatise called Unrestricted Warfare from 1999 proposed the use of ecological tactics such as creating man-made earthquakes or other natural disasters. The prospect is revived in General Zeng's report, which says: "Effective meteorological weapons could be a key to surprise in tomorrow's information warfare."

Nuclear weapons halted the game for war hawks, as they meant that any conflict between superpowers would wreck the planet. Green tech has revived the possibility of a mass war in which the environment isn't destroyed.

Our worst nightmare may be the promise of a clean fight.

John Naish is an environmental campaigner and the author of "Enough: Breaking Free from the World of More" (Hodder, £7.99)