During a recent major exercise in the Mojave Desert, a bored Marine took a photo of himself with his cellphone.

The photo could be used for geolocation, and because of that, it compromised his whole unit, Corps leaders said.

Visit Business Insider's homepage for more stories.

A junior Marine got his artillery unit into a serious bind after snapping a photo during a massive force-on-force training exercise in California's Mojave Desert.

Ten thousand troops recently descended on Marine Corps Air-Ground Combat Center Twentynine Palms for the biggest training event of its kind in decades. The Marines, sailors, and NATO forces faced drone attacks, cyber breaches and other high-tech challenges during the free-play exercise.

But one team was taken out by a different kind of threat, Lt. Gen. Lori Reynolds, the Marine Corps' deputy commandant of information, told reporters at the Pentagon.

"A Marine in that exercise took a selfie of him being bored," she said. "It showed in that selfie it was an artillery unit. You could go geo-locate him, and you could see what unit it was.

"They were like, 'OK, you guys are dead.'"

It's a tough lesson for a young Marine to learn, Reynolds said.

"And I'm sure that lance corporal was not happy," she said. "But it's OK to learn those things in Twentynine Palms — we don't want to learn those elsewhere."

Last week, the Army barred about 100 paratroopers with the 82nd Airborne Division from deploying with cellphones and other personal electronic devices, CNN reported. The North Carolina-based soldiers were sent to the Middle East amid rising tensions with Iran after the US killed one of the country's prominent military leaders in an airstrike in Iraq.

The Iranians have sophisticated cyber capabilities.

Military leaders have for years been warning troops that their cellphones and other personal devices could give away their positions overseas.

Now-retired Marine Commandant Gen. Robert Neller said in 2017 he wanted to end leathernecks' technology addiction. Cellphones, he said, were creating vulnerabilities.

"You're going to dig a hole, you're going to camouflage, you're going to turn off all your stuff," he said, adding: "Because if you can be seen, you can be attacked."

In 2018, troops' fitness trackers were also found to have shared sensitive information location data from military bases around the world.

Reynolds is leading some of the Marine Corps' biggest cultural shifts in decades as the service tries to prepare for sophisticated new threats in the information space that can take down networks, locate troops, and remove battlespace awareness.

Maj. Gen. William Mullen, head of the Marine Corps' Training and Education Command, said Marines must rethink the way they fight.

"We saw this out there at Twentynine Palms in an electronic-warfare-type environment," Mullen said. "You can't do the normal command and control we're used to from Iraq and Afghanistan ... where you pick up the radio, everything's clear, and you can always check on things."

Every time Marines do that, he said, they risk being targeted or jammed.

— Gina Harkins can be reached at gina.harkins@military.com. Follow her on Twitter @ginaaharkins.