Two active duty marines are under investigation after they posed with a gun, threatened a gay bar and posted it on Facebook.

In the photo, which was uploaded onto a private Facebook group for male marines with 25,000 members, a marine poses with a gun, biting his lip and his finger near the trigger.

The caption underneath reads: “Coming to a gay bar near you!”

In the comment, one of the marines asked: “Too soon?”, possibly referring to the deadly attack on gay nightclub Pulse in Orlando, which left 49 people dead and more than 50 people injured.

The marines are being investigated by the California-based I Marine Expeditionary Force, who vowed to take “appropriate action”.

Spokesman First Lieutenant Thomas Gray, told the Marine Corps Times that the marines have been identified.

“We cannot discuss details of an ongoing investigation, but I can tell you the command is taking this incident seriously,” Mr Gray said.

“The Marine Corps does not tolerate discrimination based on sexual orientation, race, gender or religion,” a statement said.

“...This type of behavior and mindset will not be allowed, and it is not consistent with the core values of honor, courage and commitment that are demonstrated by the vast majority of Marines on a daily basis.”

The incident has occurred less than a week after the worst shooting in modern US history, in which a lone 29-year-old gunman burst into the gay nightclub with two weapons and shot down more than 100 people.