Image copyright Pakistan Information Ministry (ISPR) Image caption Pakistan says Wing Commander Abhinandan Varthaman is being treated well

Crowds of Indians have gathered near a border crossing with Pakistan ahead of the release of an Indian fighter pilot captured by Pakistan.

Pakistan's Prime Minister Imran Khan said the pilot would be released as a "peace gesture" on Friday. India's military welcomed the move.

Wing Commander Abhinandan Varthaman's plane was shot down in the disputed region of Kashmir on Wednesday.

Both countries are under international pressure to calm tensions.

On Friday Indian Prime Minister Narendra Modi said the events of the past few days had "brought our nation closer".

"The way the nation has supported our armed forces is extraordinary and I bow to every Indian for that," he said.

On Thursday Mr Khan repeated his call for the de-escalation of the situation, saying that Pakistan and India "have to live in peace". He has also pushed for talks with Delhi.

What happened to the pilot?

Wing Commander Abhinandan was shot down in a dogfight between Indian and Pakistani jets after Pakistani air strikes on Indian-controlled territory on Wednesday.

Image copyright Pakistan Information Ministry Image caption Pakistan's information ministry tweeted a video showing the captured Indian pilot

Images then circulated of his capture, which were both condemned for what appeared to be a physical attack at the hands of residents in Pakistan-controlled Kashmir, and praised for the actions of the Pakistani soldiers who intervened to protect him.

Pakistan's information ministry published - but subsequently deleted - a video showing the blindfolded pilot, who could be heard requesting water, just after he had been captured.

Media playback is unsupported on your device Media caption Footage appears to show wreckage from a downed Indian jet

Villagers in Horran threw stones at the pilot, who fired several warning shots in response, eyewitnesses later told the BBC.

He is being hailed as a hero in India.

What led to his capture?

On Tuesday, India struck what it said was a militant camp in Pakistan in retaliation for a suicide bombing that killed at least 40 Indian troops in 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 to the Indian raids with air strikes on Wednesday. That led to a dogfight and the Indian fighter jet being shot down in Pakistan-administered Kashmir.

Image copyright Reuters Image caption Enthusiastic supporters awaited the pilot's return

Tens of thousands of troops remain positioned on either side of the border in the disputed region.

On Friday, four Indian security personnel were killed and eight others injured in a raid on militants in India-administered Kashmir.

At the height of the tension Pakistan closed its airspace, disrupting major air routes. Flight operations partially resumed on Friday and will reopen fully on Monday, the country's civil aviation authority said.

What is the political fallout?

The sequence of events over the last few days have rapidly shifted from being seen as a boost for the ruling Hindu nationalist Bharatiya Janata Party (BJP) ahead of upcoming parliamentary elections, to a general feeling of disenchantment over the way things have turned out.

On Wednesday evening, when news of the captured pilot dominated headlines, India's opposition parties issued a statement in which they attacked the ruling BJP for "blatant politicisation of the armed forces' sacrifices".

In a series of tweets, India's finance minister Arun Jaitley hit back, saying the joint statement was "being used by Pakistan to bolster its case".