Image copyright SVT Image caption Satirical programme Swedish News did a segment on Chinese tourists in last week's episode

It's a diplomatic spat no one saw coming, but tensions have over the past few weeks been escalating between China and Sweden.

It all started earlier in September when Chinese tourists were removed from a hotel by Swedish police, a move which was heavily condemned by the Chinese government.

But matters were made worse when a satirical Swedish television show joked about Chinese people eating dogs and defecating in public.

Beijing accused the show of using "vulgar language", adding that it was "full of discrimination, prejudice and provocation" against China.

The Swedish broadcaster, on the other hand, said it would be "apparent" to a Swedish speaker that the show was "comedy".

But how did both countries get here and could there be more to the feud than it seems?

How did this all this begin?

Earlier this month, a video emerged of Chinese tourists allegedly being thrown out of a hotel by police in Stockholm.

A Chinese man and his parents had allegedly arrived at the hotel at midnight - hours before they were due to check in. They asked to stay in the lobby but were refused, and eventually were forcibly removed by police.

In the video, the Chinese man is seen yelling in English "This is killing. This is killing", while falling over dramatically. His mother is seen wailing and crying in Chinese, saying "help", while police officers look on.

It was later posted on Chinese social media, where it has received millions of views and thousands of mixed comments. Some users criticised Swedish police for treating them so harshly, while others point out the family was unnecessarily "dramatic".

Image copyright BTV Image caption Chinese national broadcasters, including Beijing TV, aired the footage

As the video spread, the Chinese embassy in Sweden demanded an apology from the government, saying that the police actions had "violated the basic human rights of the Chinese citizens".

However, a manager from the hotel told Swedish newspaper Aftonbladet that the family had booked their rooms on the wrong day, and when they were told that, "refused to leave".

Is that all?

No - things soon got worse. After a few weeks of silence, relations worsened on 21 September when Svenska Nyheter, a satirical television show aired on national Swedish broadcaster SVT, took a stab at Chinese tourists in general.

The show aired the video footage of the tourists being carried out of the hotel - and also included a sketch, which was dubbed over in Mandarin and uploaded to the Chinese video sharing site Youku - about do's and don'ts for Chinese tourists.

In the sketch the host warns tourists not to defecate "outside historical heritage sites" and while eating.

Image copyright SVT Image caption The Swedish TV show uploaded a video to Chinese site Youku about do's and don'ts for Chinese tourists

"If you see a person walking their dog on the street, this does not mean they have just brought their lunch," she goes on to say.

The video says Chinese people are racist, but Sweden welcomes black people, Arabs, Jews and "even homosexuals".

"Because in Sweden, we believe in the principles of universal human worth. Although this principle does not apply to the Chinese," the narrator says.

The video ends with the host saying that Sweden welcomes Chinese tourists, but they would be beaten if they misbehaved.

The sketch went viral on Youku, the Chinese equivalent of YouTube.

How did Chinese people react?

An overwhelming number of Chinese people on the Twitter-like platform Sina Weibo have reacted with anger.

It wasn't long before the hashtag #SwedishTVShowInsultsChinesePeople started to trend, gaining more than 34 million views.

"This is unforgivable. I admit the Chinese tourists behaved embarrassingly, but they should not insult the whole of China like this. They should apologise," said one commenter.

"They purposely dubbed the sketch in Chinese... obviously they want us to know they are insulting us," one said.

"The way to stand up to Sweden is to boycott them. Do not travel there, boycott IKEA, H&M and Volvo," said another user, with many others posting similar comments.

The Chinese government was equally enraged.

"[This program] amounts to a gross insult and vicious attack on China and the Chinese people," said foreign ministry spokesperson Geng Shuang. "We strongly condemn [it]."

He added that the ministry and the Chinese Embassy in Sweden had "lodged stern representations and strong protest" with Stockholm.

SVT entertainment director Thomas Hall told the BBC that the ambition of the show was to "comment on current affairs by using satire and humour".

He clarified in a statement that the segment was published on Youku to "gather Chinese reactions", adding that "this was a mistake, as the entirety of our message and ambition was then lost... we recognise that this may have been an insult, for which we are truly sorry."

So, they've fallen out just because of tourists and a TV show?

Not really. This falling out might actually be a sign of bigger underlying issues.

The Dalai Lama - the Tibetan spiritual leader who Beijing sees as a separatist threat - visited Sweden earlier this month.

Chinese state media however, has denied that the feud has anything to do with the Dalai Lama.

Image copyright Getty Images Image caption Gui Minhai's imprisonment has been an ongoing issue of contention. He is pictured on the right.

And there's also the ongoing issue of Gui Minhai, a Swedish citizen and bookseller based in Hong Kong who was seized by Chinese authorities in January while travelling to Beijing on a train from Ningbo in eastern China.

He was with two Swedish diplomats and was said to have been on his way to see a Swedish specialist doctor. Chinese state media, however, accused Sweden of trying to spirit him out of China.

According to Viking Bohman, an analyst at the Swedish Institute of International Affairs, one "plausible explanation" for the breakdown in relations is Gui Minhai.

"I think as long as Gui Minhai is in captivity in China this will be a big point of friction… If calls for the release of Gui continue to grow in Sweden, and if China won't budge, the relationship is likely to suffer."

Reporting by the BBC's Yvette Tan