WASHINGTON (Reuters) - After more than a decade focused on combating Islamist militancy, Western military planners are once again contemplating potential war between major powers - and how to prevent one happening by accident.

U.S. soldiers walk after a ceremony for the arrival of the first company-sized contingent of about 150 U.S. paratroopers from the U.S. Army's 173rd Infantry Brigade Combat Team based in Italy in Swidwin, northern west Poland April 23, 2014. REUTERS/Kacper Pempel

Although the Cold War rivalry with Moscow has never been forgotten, current and former Western officials say Russia’s annexation of Crimea has NATO powers tearing up strategic assumptions and grimly considering both conventional and nuclear fights.

As late as March, most NATO powers - with the exception of eastern members such as the Baltic States long worried by Moscow - had assumed Europe itself faced no imminent military threat.

It is still the case that few believe Russia would attack any NATO state, but, in order to deter, Western officials say they must consider and plan for the contingency.

The threat to U.S. allies in the Pacific from a stronger China has also focused military minds on how to contain the risks there, and ensure any localized conflict does not spill over into global war.

In a major foreign policy speech at the West Point military academy last month, President Barack Obama spoke mostly on counterterrorism and the Afghanistan withdrawal. But while he said the risk from other nations was now much lower than before the Berlin Wall fell, he made clear it still existed.

“Regional aggression that goes unchecked, whether in southern Ukraine or the South China Sea or anywhere else in the world, will ultimately impact our allies and could draw in our military,” he told graduating cadets.

Tensions with Moscow and Beijing have increased faster than almost anyone in government in Washington expected. They are expected to dominate a meeting between Obama and Russian President Vladimir Putin in Normandy for the 70th anniversary of D-Day later this week.

Last weekend’s annual Shangri-La Dialogue strategic conference in Singapore, meanwhile, showcased the growing gulf between Washington and Beijing on issues from regional maritime disputes to cyber security.

In recent weeks, current and former officials say, the Obama administration has been insistently reassuring allies and signaling foes where Washington’s true red lines are.

Washington might not be prepared to act militarily in Ukraine but an attack on a NATO state such as one of the Baltics or a formal Asian ally like Japan, the Philippines or Australia would commit it irrevocably to war. Those treaty obligations are not new, but U.S. officials say it is important to make clear that they are taken extremely seriously.

They hope that will reduce the risk of an accidental war where a state takes action wrongly assuming other powers will not respond.

“It’s not that the leadership in Russia or China is looking for a war - and the United States certainly isn’t,” says Kathleen Hicks, a U.S. undersecretary for defense until last July who now works for the Center for Strategic and International Studies in Washington.

“The real worry is miscalculation.”

GREAT WAR

One hundred years after the start of World War One, books on the period have become increasingly popular in Washington, Whitehall and NATO headquarters in Brussels, current and former officials say, and not purely for their historical interest.

In June 1914, the killing of Austria’s Archduke Franz Ferdinand by a Serb nationalist triggered actions and alliances that brought war in barely a month.

Now, experts say flashpoints could range from a clash over disputed South China Sea islands or ethnic strife in Russia’s former Soviet neighbors to a wrongly attributed cyber attack.

Even as Washington reassures allies, Moscow and Beijing have asserted their might against Ukraine and Vietnam which lack such formal alliances. The risk, experts say, is that they become overconfident and misjudge.

“The parallels with 1914 can definitely be overstated,” said Nikolas Gvosdev, professor of national security studies at the U.S. Naval War College.

“But they do show us that war can start through unintended consequences and an economically interdependent world does not necessarily stop it from happening.”

As in 1914, no one really knows what a modern great war would be like.

While much military thinking assumes conflict would remain conventional, nuclear powers have kept their atomic war planning up to date, maintaining target lists for mutually assured destruction, current and former officials say.

Cyber attacks, some experts say, could be almost as destructive, as could the effects on global trade in an unprecedentedly interconnected world.

Meanwhile, some of the systems supposed to prevent conflict may be starting to weaken.

WEAKENED LINKS

U.S. officials had embarked on a campaign to build formal and informal communications channels with Beijing, mimicking the hotlines and procedures set up with Russia.

Moscow and Washington have used those systems themselves in recent months to notify each other of missile tests and reconnaissance flights over each other’s territory.

Links with Russia, however, have weakened this year as NATO states canceled conferences and military exchanges with Moscow in protest at the annexation of Crimea.

Contacts with China have also deteriorated in the last month, particularly since Washington indicted five Chinese officials for cyber espionage, a charge Beijing denies.

A near collision between U.S. and Chinese warships in January, a mock Russian attack on a U.S. destroyer in the Black Sea in April and periodic confrontations between long-range bombers and other aircraft show the risks, experts warn.

Last week on Japan and China accused each other of “dangerous” and “over the top” actions after warplanes came within a few dozen meters.

Any additional challenge to the West, some analysts say, is that both Russia and China know Washington would struggle to handle simultaneous confrontations.

U.S. forces are spread around the world while Moscow’s and Beijing’s, while smaller, are almost exclusively focused on their immediate neighborhood. Since 2008, they have increased military spending 30 and 40 percent respectively, according to London’s International Institute for Strategic Studies.

The 2012 Asia “pivot”, which saw the U.S. Navy in particular moving to increase its Pacific footprint, aimed to make crisis response easier.

In Europe, in contrast, NATO has little developed thinking beyond its post-Crimea strategy of putting small numbers of U.S. troops and jets on the frontline in eastern member states they fear Moscow might target next.

Until Ukraine, European states had viewed their primary military focus as occasional intervention, peacekeeping and counterinsurgency in the Middle East and Africa.

“We are in uncharted territory,” said one senior Western official who spoke on condition of anonymity. “It means ... reconstituting high end fighting skills and properly thought through doctrine for both conventional and nuclear deterrence.”