Liking something by mistake on social media is all too easy – something Senator Ted Cruz and his team may have discovered after accidentally sharing pornography on Twitter.

Mr Cruz said an aide was responsible for the “like” given to a two-minute porn video on the social media platform from @SexuallPosts.

The footage of two women and a man engaged in sexual activity showed under Mr Cruz’s “likes” briefly early Tuesday morning, but was removed by 1.30am local time.

The Texas Republican and 2016 presidential candidate said that several aides have access to the account and that one inadvertently posted the pornography.

Mr Cruz told reporters that “it was a staffing issue and it was inadvertent. It was a mistake. It was not a deliberate action.”

“Liking” — which only people with access to a Twitter account are able to do — causes it to appear on one's feed. Twitter prohibits pornography on its platform.

Catherine Frazier, senior communications adviser to Mr Cruz, tweeted: “The offensive tweet posted on @tedcruz account earlier has been removed by staff and reported to Twitter.”

(Twitter / Chris Geidner)

Mr Cruz sought to make light of the episode, which gained widespread notice on the popular social media site.

“This is not how I envisioned waking up this morning,” Mr Cruz said. “Although I will say that if I had known that this would trend so quickly, perhaps we should have posted something like this back during the Indiana primary.”

This is not the first time the failed Presidential candidate, who Donald Trump nicknamed “Lyin’ Ted”, has been associated with pornography.

Last year, his campaign had to retract an advert attacking his former rival, Florida Senator Marco Rubio, after learning the team had hired softcore porn actor Amy Lindsay.

The evangelical Christian politician has tried – and failed – to ban sex toys in 2007.

He has also regularly voted against bodily autonomy for women.