Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Two Marines are under investigation after allegedly posting a photo on social media with a rifle — with the words "Coming to a gay bar near you!" — military officials said Thursday.

The callous taunt was clearly a reference to and came just a few days after the massacre at a gay nightclub in Orlando, Florida, that left 49 people dead and more than 50 others injured.

Marine Corps officials confirmed to NBC News that two Marines from the 1st Marine Expeditionary Force in California were being investigated after posting the photo on Facebook, which showed a corporal holding up a rifle with his fingers on the trigger with the message “Coming to a gay bar near you!” superimposed near the bottom of the image.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The Marines under investigation are the corporal in the photo and the person who posted the image online.

West Coast Marines under investigation for social media post threatening attack on gay bars https://t.co/W7QHAQM4FS — Marine Corps Times (@Marinetimes) June 16, 2016

The 1st Marine Expeditionary Force released a statement Thursday saying they do not "tolerate discrimination based on sexual orientation, race, gender or religion."

"We are currently investigating a threatening social media post and will take appropriate action," the 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 Marine Corps is not releasing the names of either person unless they are charged.

The photo was recently posted to a closed Facebook group for male Marines called "Camp MENdleton resale," according to the Marine Corps Times. The group has more than 25,000 members.

The Corps Times reported that the person who shared the image also allegedly posted it with the phrase “too soon?”

Michael Moss, the founder of the Facebook group, told the publication that the image was deleted as soon as it was reported and the person who posted it was immediately banned from the group.