When she wanted to get tough for her latest release, the young singer picked up an M-16 and trained with actual Marines at Camp Pendleton.

Perry’s “Part of Me” video, released Wednesday, was shot over three days in February at Pendleton’s Camp Horno area and at Red Beach, the sandy stretch off Interstate 5 where Marines practice maneuvers.

It’s likely the first major music video to be shot at a Marine base, officials say.

Katy Perry Part of Me video

About 80 local Marines participated in the filming, which shows Perry as a new enlistee getting her post-boot camp combat training.

In the girl power-themed video, Perry dumps her cheating boyfriend, then enlists after seeing a bumper sticker that says “All Women Are Created Equal, Then Some Become Marines.”

The Corps green-lighted the video because it was an opportunity to feature female Marines and reach the young, worldwide audience that follows music videos, said Lt. Col. Jason Johnston, director of the Marine Corps Motion Picture & Television Liaison Office in Los Angeles.

“My job is really to educate the public about what the Marine Corps does,” he said.

“Millions of people who probably have no exposure to the Marine Corps got a chance to see our female Marines and what they do,” Johnston said. “So I thought that was pretty cool.”

Also, he said, the director would probably make the video anyway. The Marine Corps saw it would be better for it to be realistic.

As for Perry, she told MTV News, “For three days, I was like a wannabe Marine, which was so difficult.”

She was sore and exhausted, but, “I learned how to flip someone. I learned how to flip them on their back. I learned how to wrestle underwater.”

But though the Marines taught Perry how to salute, carry a rifle and perform mixed-martial arts moves, the video isn’t ultra realistic.

It shows her storming a beach in an amphibious assault vehicle, which is something female Marines probably wouldn’t do.

Johnston said he has seen women as passengers in these beach-storming “amtracks” during training exercises, so he cleared it for the video.

“They’ve got to get to shore somehow. Just because they are women, they’re not going to take the ‘nice’ boat,” he said. “The way I looked at it, ‘Could this happen? Yes.’ Therefore, I would allow this to happen on camera.”

Also, Perry and her comrades are shown carrying logs and boats overhead and lying with linked arms in the pounding surf. Those are Navy SEAL training tactics, not ones usually employed by Marines.

But Johnston said the director liked them. It’s Hollywood, after all.

The magic of the camera made 80 Marines and six military vehicles look like a sizable invasion force.

Johnston said the Corps allocated two Humvees, two seven-ton trucks and two amphibious vehicles for the video. (The helicopter shown in the footage was added by later via computer graphics.)

Perry’s record label didn’t pay the government for the vehicles, or for the fuel used. Johnston said the kinds of tasks performed for the video were close to what Marines normally do, so they chalked the fuel costs up to training.

The Marines who appear with the singer didn’t get paid, as that’s against military rules.

The female Marines were volunteers, Johnston said, though he said he wasn’t sure about the men.

Perry, who is known for making story-focused videos, said she chose a military theme for this breakup song because it was the best way to show power.

“This feels like one of the most aggressive songs I’ve ever put out,” she told MTV News. “It’s an affirmation of strength.”