An obscene tweet showing a woman in stockings performing a sex act was "liked" by the country's ambassador to the UK because of a "vicious hacking attack", China’s embassy has claimed.

Officials have demanded an urgent investigation by Twitter after ambassador Liu Xiaoming’s official Twitter account interacted with the pornographic tweet.

The caption with the clip in Chinese is roughly translated as: "Lucky quality single guy, warm up first."

China's embassy claimed Liu Xiaoming’s account must have been "viciously attacked" on Wednesday after the post showing a woman carrying out a sex act appeared in his likes.

The 64-year-old also favourited posts that were critical of the Chinese Communist Party.

Twitter has not yet commented on the post

In a statement, the embassy defended the ambassador claiming "anti-China elements" hacked his profile.

In a tweet, a spokesman said: "Recently some anti-China elements viciously attacked ambassador Liu Xiaoming’s Twitter account and employed despicable methods to deceive the public. The Chinese embassy strongly condemns such abominable behaviour.

"The embassy has reported this to Twitter company and urged the latter to make thorough investigations and handle this matter seriously. The Embassy reserves the right to take further actions and hope that the public will not believe or spread such rumour."

The ambassador's account 'liked' a racy clip with a woman in stockings

Liu retweeted the post and said: "A good anvil does not fear the hammer."

The ambassador was widely condemned on Wednesday after the obscene video remained in his likes for at least an hour.

As well as the sex vid, the ambassador liked posts that were critical about China.

One included claims that officials had "paid lip service to non-interference" in order to get away with killing members of the Chinese public.

A second featured drone-captured footage of Uighur Muslims being taken to what the post described as a "concentration camp".

Liu follows only 14 accounts, mostly Chinese state media or official Chinese and UK government accounts, and the UK royal family.

He has a verified account with 85,500 followers, now with just two liked posts both of his own tweets.

Twitter is one of a handful of social media platforms banned in China on which diplomats maintain verified, official accounts.

The social media platform is yet to comment.