Iraq, which began in 2003 as a classic movement of state-versus-state warfare with tanks and a big invading force, evolved into another counterinsurgency campaign. Today American forces are fighting yet another counterinsurgency against the Islamic State in Iraq and Syria.

“All of us, from the Army to the Navy to the Marine Corps, we fought well and courageously for 15 years against a tough foe,” said Gen. Robert B. Neller, the commandant of the Marine Corps. “But now we think about who might the next fight be.”

It will probably be, he said, “somebody who’s got electronic warfare, armored vehicles and the ability to maneuver.”

On the recent morning at Twentynine Palms, General Neller was joined by Adm. John M. Richardson, the chief of naval operations, to watch the training exercise — the first time a Navy chief had traveled to the Marine base to do so. Defense officials say the changing nature of war calls for closer cooperation between the services.

“When you look at this return of great power competition, one of the things that we have to pay more attention to, think harder about, is not only power projection, which is what we’ve been doing, but also sea control,” Admiral Richardson said. “Naval combat at sea. Work our way, fight our way in, from further out in the ocean.”