Some Cruz control might be in order.

Sen. Ted Cruz delighted and dismayed Twitter early Tuesday after his verified account “liked” a pornographic video post. The lewd tweet from @SexuallPosts, which appeared on the Texas Republican’s publicly viewable collection of 1,200+ liked Twitter posts, was unliked roughly an hour later — but preserved for posterity in users’ screenshots.

Cruz’s senior communications adviser, Catherine Frazier, issued a carefully worded tweet at 2:16 a.m.: “The offensive tweet posted on @tedcruz account earlier has been removed by staff and reported to Twitter.” A spokesman for the senator did not immediately return a Moneyish request for further comment.

Cruz later cracked a joke about the X-rated gaffe, telling reporters: “(H)ad I known that this would trend so quickly, perhaps we should have done something like this during the Indiana primary. In all seriousness, there are a number of people on the team that have access to the account and it appears that someone inadvertently hit the like button.” He blamed a “staffing issue” and maintained the like was not deliberate or malicious — adding his team was “dealing with it internally” when asked if anyone would be fired or disciplined.

The conservative crusader is the latest public figure to field uncomfortable inquiries about his Twitter activity: Last month, President Trump’s official account retweeted, then deleted, a user’s post calling him a “fascist.” In 2014, an aide to Rep. Keith Ellison (D-Minn.) apologized after retweeting a photo of meat frying on a stove with the caption “hell yeah benihana up in this b—h.” But any public figure or brand, especially ones with staffers managing social accounts, could fall prey to such a predicament. Here’s what experts advised:

Have a clearly defined protocol in place “in terms of approval processes and who has permissions to post content on social media and who does not, (and) ensuring that two sets of eyes always monitor every activity on social media when possible,” crisis communications consultant Todd Ragusa told Moneyish. Use third-party software platforms like Hootsuite and Buffer to manage multiple accounts and help prevent accidental posts, he added.

Respond quickly. “You don’t want to drag out a story by releasing a statement or response late in the news cycle that would then extend the life of the story,” said Ragusa. But “you don’t want to get out so quickly that you internally have not gathered all the facts and gotten your own story straight to where the response that you release would beg more questions later in the news cycle and kind of create another news cycle.” In a nutshell, Ragusa said: “Nip it in the bud at the outset.”

The culpable person should own up internally — and quickly — so that the communications team and executive leadership can determine an appropriate response, said Ragusa. “That response can reflect your brand values and it should speak directly to your audience.”

“If someone has made an honest mistake just clicking the wrong place, you just tell the public the individual has been counseled about being more careful and will make sure it doesn’t happen again,” added Jonathan Bernstein, the president of Bernstein Crisis Management, Inc. who has put out PR fires for 35 years. “Obviously if it was deliberate by a staffer, then they have to make a stronger statement.”

With that said, “there is no obligation to say ‘and we are firing that person’ or ‘that person has been fired’ so specifically,” Karen Wickre, a senior editorial team member at Twitter and Google for about 14 years. “‘We are dealing with it’ should be enough.”

Own the situation. While the “default position is to blame the staffer (or) say you left your phone lying around,” that defense “doesn’t fly as it’s clearly a lie,” PR consigliere and author Paul Blanchard told Moneyish in an email. “A better response is to ‘own’ the situation — admit that you liked the tweet but that thousands of tweets appear on your timeline every hour, and it’s inevitable that some mistakes are made.”

Use humor and humility. “The American public is quick to laugh at, and quick to forgive, human errors by public figures,” Bernstein said. “The notable exception would be if what was probably an accidental click turned out to be a trend of sexual impropriety.”

Don’t issue repeated comments. One statement will do, said Wickre: “(Anything more), they dig themselves a deeper hole … there’s no point in correcting and amending and updating.”

Review social media accounts and practices on a regular basis. “In these overheated times, especially for politicians, they need to have a real kind of protocol and review every last little inch of how things work for them,” Wickre said. That means reviewing the entire profile, any links, likes and accounts followed — as well as which staff members have access to each account. Consider safeguards like two-factor authentication, she added.

Training — and refresher training — are also key, said Bernstein. Make sure employees are trained in related fields like PR and digital communications. “A vulnerability that we’ve seen is having someone assigned to social media accounts that does not have the training or experience to do that,” he said.