The Navy has investigated the case of a sailor who didn't salute as the national anthem played at Pearl Harbor, in a protest that echoes recent moves by professional athletes to kneel during the anthem. The U.S. Pacific Fleet referred her case to her commander, who has the authority to punish the sailor, a Navy reservist. Saluting during the national anthem is a daily ritual for men and women in the military. Here's a look at the protocol behind it.

WHAT ARE THE MILITARY'S RULES ABOUT SALUTING FOR THE NATIONAL ANTHEM?

Troops learn during basic training and officer training — their first introduction to the military — about saluting when the anthem is played and the flag is raised. The ritual is referred to as the "call to colors."

Military rules obligate servicemen and women to salute when they hear the anthem if they are in uniform. Those who happen to be in an area where the flag is being raised must salute the flag. If they don't see the flag around them, they're expected to stop and salute in the direction of the music.

Those not wearing their uniforms must stand and place their hand over their hearts. A 2008 law clarified that service members may salute even in civilian dress.

WHY DO SERVICE MEMBERS DO THIS?

Carl W. Baker, a retired Air Force lieutenant colonel, said the ritual is about paying respect to the constitution. "One of the first things you're taught is that you have to stand at attention during colors, and look toward the flag and salute to the flag," said Baker who served 32 years in the military.

DO SERVICE MEMBERS ALWAYS HAVE TO SALUTE?

As long as they can hear the music.

"If you're driving in your car and you hear the national anthem, you have to stop and get out of your car," said Baker, who is now the director of programs at Pacific Forum CSIS, a think tank in Honolulu. Viewers of this summer's Olympics may recall U.S. athlete and Army reservist Sam Kendricks stopping in the middle of his pole vault sprint to stand at attention when the anthem began playing at the track and field stadium in Rio de Janeiro.

That wasn't surprising, said Col. Bob Taradah, the deputy to Defense Secretary Ash Carter's senior adviser for military professionalism.

"That's very typical of what you can expect of somebody who feels that it's their professional obligation to pay respect to the nation that they've sworn to defend," he said.

WHAT HAPPENS IF SERVICE MEMBERS INTENTIONALLY DON'T SALUTE?

Last month, the Naval Air Technical Training Center in Pensacola, Florida, got word a sailor had filmed herself while refusing to stand during the anthem. Spokeswoman Lt. Cmdr. Katherine Meadows said the sailor was "properly disciplined." She declined to give further details.

This month, the U.S. Pacific Fleet investigated the case of a sailor who didn't salute as the national anthem played at Pearl Harbor. The sailor, Petty Officer 2nd Class Janaye Ervin, is an intelligence specialist in the Navy Reserve who was in Hawaii for about two weeks for an exercise.

A deleted post on a Facebook page that appears to belong to Ervin explains why she chose not to stand during the National Anthem.

"On September 19, 2016, while in uniform, I made the conscious decision to not stand for the Star Spangled Banner because I feel like a hypocrite, singing about 'land of the free' when, I know that only applies to some Americans. I will gladly stand again, when ALL AMERICANS are afforded the same freedom," the Sept. 21 post said. "The Navy has decided to punish me for defending the Constitution and has taken away my equipment I need to do my Naval job. It was my pleasure serving my country, I love it dearly, that is why I must do this for you. I will keep you all posted on what happens next!"

Ervin did not respond to efforts made by The Associated Press to verify the post, including messages sent via social media and email. A working telephone number for Ervin could not be found.

IS THERE ANY HISTORICAL PRECEDENT FOR PROTESTING BY NOT SALUTING?

The African-American Military History Museum in Hattiesburg, Mississippi doesn't have any record of servicemen and women protesting, said Sheila Varnado, president of the museum's advisory committee.

Varnado, who retired as colonel after 27 years in the Army, said she was taught that those wearing the uniform represented not just themselves but the military and the United States. As a result, it wasn't appropriate to express personal feelings or protest while in uniform, she said. She suggested donating money to a cause or writing a newspaper opinion article instead.

African Americans have served in the military since the birth of the United States, including at times when "this nation definitely did not even recognize African Americans as citizens or full beings," she said.

"You're striving for and agreeing with what our country says it wants to be, not necessarily what it is at any given moment in time," she said.