Comedian Trevor Noah has said he is sorry for making jokes about the sharp rise in tensions between India and Pakistan over disputed Kashmir.

He said a war between the two would be "the most entertaining", adding "it would also be the longest war of all time - another dance number!"

The gag, in an episode of The Daily Show, caused most anger in India where thousands poured fury onto Twitter.

India and Pakistan have fought two wars and a limited conflict over Kashmir.

Both countries claim all of Kashmir, but each controls only part of it. The events of the past two weeks has seen an almost unprecedented escalation, which culminated in Pakistan shooting down an Indian fighter jet and capturing an Indian pilot - they later released him.

Shelling over the de facto border dividing Kashmir continued over the weekend, resulting in civilian casualties on both sides.

How did the row unfold?
After Noah's Daily Show appearance last week, criticism built up online which saw the South African comedian condemned as "racist" and "insensitive".

When one Twitter user accused him of mocking "war through a Bollywood stereotype", Noah responded with an explanation of his comedy process - but also said "I am sorry that this hurt you and others, that's not what I was trying to do".

He said that he used comedy to "process pain and discomfort", pointing out that he had even made jokes about his mother being shot in the head.

He followed up by saying that he was amazed that his joke over the conflict "trended more than the actual conflict itself".

That sentiment also clearly struck a chord. Some users said the outrage that trended over his jokes was "unnecessary", and just another example of the social media echo chamber that amplifies all offence.

On The Daily Show's own YouTube page, some expressed dismay but many chimed in to say they found the segment funny.

Twitter is the social media platform where political controversy in India tends to play out - and so this is where offence escalated most. In addition, there isn't a well established tradition of political satire in India, so Noah's comedy was bound to have its detractors.

A Facebook page called Humans of Hindutva became notorious in India for poking fun at political leaders and parties. It amassed a large following quickly - but was also seen as very controversial in India and felt compelled to pause its satire.

Indian celebrities have also been castigated for taking a political stand - and sometimes, for not taking one.

Bollywood actress Priyanka Chopra's recent tweet in support of the Indian air force has now spurred a petition in Pakistan against her, calling on Unicef to strip her of her Goodwill Ambassador title.

How did the Kashmir conflict escalate?
On 26 February, India carried out air strikes on what it said was a militant camp in Pakistan in retaliation for a suicide bombing that killed at least 40 Indian troops in Indian-administered Kashmir on 14 February.

A Pakistan-based group said it carried out the attack - the deadliest to take place during a three-decade insurgency against Indian rule in Kashmir.

Pakistan - which denies any involvement in the 14 February attack - said it had no choice but to retaliate with air strikes last week.

That led to a dogfight and an Indian fighter jet being shot down in Pakistan-administered Kashmir. The fighter pilot, who was captured by Pakistan, was released on 1 March and arrived in India, where he has been hailed as a hero.