Sen. Ted Cruz’s “like” of an X-rated porn post has been scrubbed from the internet and reported to Twitter, his spokeswoman said early Tuesday.

“The offensive tweet posted on @tedcruz account earlier has been removed by staff and reported to Twitter,” Catherine Frazier tweeted early Tuesday.

Cruz — or at least someone associated with his official verified Twitter account — was caught “liking” a video clip posted by porn account @SexuallPosts depicting a Heidi Cruz lookalike watching two naked people having sex.

The raunchy post was one of 1,248 “likes” on the conservative Republican’s Twitter before it was deleted.

Still, Twitter trolls ripped Cruz for the apparent slip-up.

“It’s been deleted?!! Don’t worry, a bunch of us saved it for you,” @suburbangrouse replied to Frazier’s post, along with a screenshot of the embarrassing “like.”

The social-media snafu harks back to disgraced Congressman Anthony Weiner, who notoriously denied posting a lewd crotch shot to his 45,000 followers on Twitter and claimed he was hacked.

A couple weeks later, he owned up to inadvertently posting the penis pic to the public while refusing to resign from Congress.