Democratic Rep. Brad Sherman is firing back after photos went viral appearing to show him viewing explicit images on a tablet while aboard a flight, prompting swift online backlash.

Images posted to X Friday appeared to show the California congressman, 71, staring at a tablet with his mouth agape while scrolling through photos of women in their underwear.

"Why did California Congressman Brad Sherman feel it was appropriate to look at porn on his iPad during a flight today?" one X post said.

JAY JONES MURDER TEXTS LATEST CASE OF DEMOCRATS CIRCLING THE SCANDAL WAGONS

The post had amassed 12.4 million views as of Saturday evening.

Sherman denied the allegations, and a spokesperson for the congressman told Fox News Digital the pictures appeared because of his algorithm on X, formerly Twitter.

"This was nothing more than scrolling through Twitter, and, unfortunately, Elon Musk has ruined the Twitter algorithm to give people content that they don’t ask for or subscribe to," a spokesperson for Sherman told Fox News Digital in an email.

Sherman similarly told Punchbowl News the images appeared on his X feed under the "For You" section of X, a page that shows recommended content.

"This was on Twitter. These pictures came up on ‘For You'," Sherman told Punchbowl News, adding he viewed a variety of posts during his cross-country flight.

"If you have to fly across the country, you look at a lot of stuff on your tablet," he said.

FOX NEWS POLITICS NEWSLETTER: MAJOR PENTAGON CONTRACTOR EXECUTIVE CAUGHT IN CHILD SEX STING OPERATION

"If I see a picture of a woman, might I look at it longer than a sunset? Yeah."

When asked whether he thought the content was appropriate to view on a plane, Sherman told Punchbowl News, "Is it pornography? I don’t think Elon Musk thinks so. Is it appropriate? No."

The images quickly drew widespread reactions across social media.

Donald Trump Jr. responded to the viral post with, "Yikes!!!!"

EPSTEIN DOCUMENTS RAISE NEW QUESTIONS ABOUT TRUMP CONDUCT AS HE DENOUNCES DEMOCRATS

Firing back at Donald Trump Jr., Sherman posted an edited version of the photo showing his iPad screen replaced with the words, "Release the Epstein files."

Rep. Nancy Mace, R-S.C., also weighed in, writing, "I don’t want to hear a single peep from anyone in/around Congress, or the media, [about] how I stroll through an airport ever again."

Mace recently demanded the resignation of Charleston Airport CEO Elliot Summey and threatened legal action after airport officials accused her of mistreating staff.

X did not immediately respond to Fox News Digital's request for comment.