The Biden administration admitted Thursday that should not have posted a picture showing the faces of members of an elite U.S. Army Special Forces unit on assignment in Israel when it posted a photo of them in uniform shaking hands with the president.

Apologizing for the mishap, a White House spokesperson told Fox News, “As soon as this was brought to our attention, we immediately deleted the photo. We regret the error and any issues this may have caused.”

The photo was posted on the White House’s Instagram account late Wednesday and included the faces of four special forces soldiers as they met Biden, who was on his high-profile trip to Israel at the time amid its ongoing war with Hamas.

JERUSALEM DEPUTY MAYOR DEMANDS ‘PROOF OF LIFE’ OF HOSTAGES, ASSURANCE BEFORE BIDEN HUMANITARIAN AIDE HITS GAZA

“In Israel, President Biden met with first responders to thank them for their bravery and the work they’re doing in response to the Hamas terrorist attacks,” the caption below the photo read.

The post received hundreds of thousands of views before finally being taken down about an hour later.

The Department of Defense’s usual practice is to blur the photos of soldiers belonging to elite units of the U.S. military in official photos to protect their identities for safety and operational security reasons.

HOUSE REPUBLICANS PROBE BIDEN ADMIN’S RESPONSE TO FOREIGN TERROR THREAT AT BORDER AFTER HAMAS ATTACKS ISRAEL

The blunder illicited sharp criticism from Republicans with some blasting the White House as incompetent.

The Republican National Committee’s Alec Sears ridiculed the White House’s blunder on X, formerly Twitter. 

“So funny that the ‘Adults in charge’ are so on top of things they doxxed one of our most elite fighting forces in the midst of their deployment to the Middle East,” Sears wrote.

CLICK HERE TO GET THE FOX NEWS APP

Fox News’ Peter Doocy contributed reporting.