The Twitter account of former presidential candidate and prominent "family values" politician Ted Cruz has liked a pornographic video.

The Texas senator's Twitter liked a post from an account called "Sexuall Posts" which included a minute-long video from a hard-core pornographic film.

The post was live on his Twitter likes page for half an hour and nobody has explained who is responsible for the faux pas.

Cruz has long been an opponent of pornography , as well as other aspects of sexuality that he deems to be unsavoury.

"Pornography...has become a public health crisis that is destroying the life of millions," he said last year.

His list of other Twitter likes is more benign and proper, focused in recent days on the clean-up effort from Hurricane Harvey, which devastated his home state.

Cruz was one of the last candidates in the Republican presidential race in 2016, repeatedly criticising eventual nominee and President Donald Trump's morality.

Trump responded with a nickname that stuck through the campaign: "Lyin' Ted".

He was caught up in another pornography scandal last year, although one he had no role in.

A campaign ad featured an actress who has a long history of erotic films.

"Amy Lindsay has appeared in films such as Erotic Confessions, Carnal Wishes, Secrets of a Chambermaid, and Insatiable Desires," Buzzfeed reported.

Cruz is facing re-election for his Texas senate seat next year.