This undated photo, provided by Stars and Stripes, shows Cameron...

This undated photo, provided by Stars and Stripes, shows Cameron Yaste, commanding officer of the destroyer USS John McCain, firing a rifle with a backwards scope. Credit: AP

SAN DIEGO — The commander of a Navy destroyer that’s helping protect the San Diego-based aircraft carrier USS Theodore Roosevelt in the Middle East has been relieved of duty about four months after he was seen in a photo firing a rifle with a scope mounted backward.

The image brought the Navy considerable ridicule on social media. The San Diego Union-Tribune reported that Cameron Yaste, commanding officer of the destroyer USS John McCain, was removed on Friday.

The Navy said Yaste was relieved of duty “due to a loss of confidence in his ability to command the guided-missile destroyer” that's currently deployed in the Gulf of Oman. The statement didn't elaborate about why Yaste was replaced.

In April, a photo posted on the Navy's social media showed Yaste in a firing stance gripping the rifle with a backward scope.

The military news outlet Stars and Stripes reported that the Marine Corps took a dig at the Navy, sharing a photo on its social media of a Marine firing a weapon aboard the amphibious assault ship USS Boxer. The caption read: “Clear Sight Picture.”

The post featuring Yaste was ultimately deleted. “Thank you for pointing out our rifle scope error in the previous post,” the Navy later wrote on social media. “Picture has been removed until EMI (extra military instruction) is completed.”

Yaste has been temporarily replaced by Capt. Allison Christy, deputy commodore of Destroyer Squadron 21, which is part of the USS Abraham Lincoln Carrier Strike Group that's also in the Gulf of Oman.

The USS John S. McCain, under repair at a dry...

The USS John S. McCain, under repair at a dry dock, is seen after a rededication ceremony for at the U.S. Naval base in Yokosuka, southwest of Tokyo, Thursday, July 12, 2018. Credit: AP/Eugene Hoshiko

The Pentagon sent the carriers to the Middle East to be in position should Israel need help repelling an attack by Iran or other countries, if such a thing happens, military officials said.

The Roosevelt is the flagship of a strike group that has recently included three Arleigh Burke-class destroyers, $2 billion vessels that are designed to shield carriers from attacks by air, sea and land.

Get the latest news and more great videos at NewsdayTV Credit: Newsday

Gilgo victim update ... Convicted killer pins murders on Heuermann ... Blakeman deputies ... Deal-breakers for homeowners

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME