An Indian pilot captured by Pakistan after his fighter jet was shot down has been returned to India.
Wing Commander Abhinandan Varthaman, 35, shook hands with Indian military officials after walking across the border at the Wagah crossing between the two countries, which this week came closer to full-blown war than they have for decades.
Crowds had gathered on the Indian side of the border in the early morning to welcome the pilot home, but he was not returned until 21:20 p.m. local time.
Indian Prime Minister Narendra Modi wrote on Twitter that India was "proud" of the pilot's "exemplary courage."
Pakistan Prime Minister Imran Khan announced Thursday Abhinandan would be released as a "peace gesture."
"We have an Indian pilot. As a peace gesture we will release him tomorrow," Khan told lawmakers in the capital Islamabad.
Abhinandan was paraded by the Pakistani military before media after his jet was shot down on Wednesday following days of conflict between the nuclear-armed neighbors.
In a video that went viral on WhatsApp and Twitter in Pakistan and India, a man that appeared to be the pilot was shown in a bloodied uniform being beaten by a mob of men.
Pakistan's Information Ministry then shared and deleted a video showing the man wearing a blindfold and asking for water.
A subsequent video released by the Pakistani military showed the pilot drinking tea and thanking his captors for treating him well. He gives his name and rank but when asked questions about where he is from, what he was flying, and what his mission was, he replies, “I am sorry, sir, that’s all I’m supposed to tell you.”
In a statement, the Indian government said it “strongly objected to Pakistan’s vulgar display of an injured personnel of the Indian air force in violation of all norms of international humanitarian law.”
Pakistan initially said it had shot down two planes and captured two pilots, but later retracted the claim, while India said a MiG-21 fighter jet had been lost.
The trigger to this week's escalating conflict was a Pakistani militant group killing 40 Indian troops in a suicide bombing in disputed Kashmir earlier this month.
India subsequently launched air strikes against what it said were training camps in Pakistan on Tuesday, which led to Pakistan bombing what it said was uninhabited territory in Indian Kashmir. A dogfight between the countries' jets then followed, leading to the Indian plane being downed.
In a televised address on Wednesday, Pakistani Prime Minister Khan addressed India directly: “With the weapons you have and the weapons we have, can we afford miscalculation? Shouldn’t we think that if this escalates, what will it lead to?”
Indian Prime Minister Modi, preparing for a general election this spring, was slower to comment on this week's events.
But he told a rally in the country's south on Friday that “the events of the past few days have demonstrated yet again the strength of our armed forces. It has also brought our nation closer."
Speaking on Thursday in Hanoi as his nuclear summit with North Korean leader Kim Jong Un ended without a deal, US President Donald Trump hinted at "reasonably attractive news" from Pakistan and India.
"They have been going at it and we have been involved in trying to have them stop and we have some reasonably decent news hopefully that will be coming to an end. It’s been going on for a long time for decades and decades," Trump said. "There is a lot of dislike unfortunately so we have been in the middle trying to help them both out, see if we can get some organization and some peace. And I think that is probably going to be happening."