CAMP PENDLETON, Calif. — In the early morning along a barren stretch of beach here last week, Japanese soldiers and American Marines practiced how to invade and retake an island captured by hostile forces.

Memo to Beijing: Be forewarned.

One Marine sergeant yelled for his men, guns drawn, to push into the right building as they climbed through the window of an empty house meant to simulate a seaside dwelling. The Marines had poured out of four amphibious assault vehicles as another group of smaller inflatable boats carrying soldiers of Japan’s Western Army Infantry Regiment landed in an accompanying beachhead assault.

There were shouts in Japanese. There were shouts in Marine English. There was air support, from Huey and Cobra helicopters hovering above. Then larger Navy hovercrafts roared in, spitting up a spray of seawater before burping out Humvees and more Japanese troops, their faces blackened with camouflage paint.

American military officials, viewing the cooperative action of the former World War II enemies from a nearby hillside, insisted that the annual exercise, called Iron Fist, had nothing, nothing to do with last fall’s game of chicken between Tokyo and Beijing over islands that are largely piles of rocks in the East China Sea. But Lt. Col. John O’Neal, commander of the 15th Marine Expeditionary Unit, said that this year, the Japanese team came with “a new sense of purpose.”