An Indian pilot who became the face of escalating conflict in South Asia was on Friday handed over to Indian authorities by Pakistan at the Wagah border crossing, officials and local media reported.

Wing Commander Abhinandan Varthaman was held in Pakistan after his aircraft was downed on Wednesday in a dogfight between Indian and Pakistani jets along the disputed border with Kashmir.

A day later, Pakistani Prime Minister Imran Khan announced his release in a widely-hailed gesture of goodwill.

“The captured Indian Air Force Wing Commander Abhinandan Varthaman has been returned to India today. He was arrested when his military jet MIG-21 crashed in Azad Jammu & Kashmir after being shot down by Pakistan Air Force for violating Pakistani airspace on February 27, 2019,” Pakistan’s Foreign Ministry said in a statement.

“While in captivity, he was treated with dignity and in line with international law. Prime Minister of Pakistan Mr. Imran Khan announced his return as a goodwill gesture aimed at de-escalating rising tensions with India,” the statement added.

According to NDTV, an Indian broadcaster, Indian Air Vice Marshal RGK Kapoor spoke to media at the Wagah border and said: "As per Standing Operating procedure of the Indian Air Force, he [Abinandan] will now be taken for a detailed medical checkup. This checkup is mandated particularly because the officer has had to eject from an aeroplane which would have put his entire body under great stress. IAF [Indian Air Force] is happy to have Abhinandan back."

Indian Prime Minister Narendra Modi paid homage to the pilot in a Twitter post.

“Welcome Home Wing Commander Abhinandan! The nation is proud of your exemplary courage. Our armed forces are an inspiration for 130 crore Indians,” Modi said.

Meanwhile, Indian State Minister for External Affairs Vijay Kumar Singh welcomed the Indian pilot upon his return.

"Welcome back soldier. You have made us all very proud. I salute your valor, courage, conviction, calmness and selflessness," Singh said in a Twitter post.

Tensions between the two nuclear armed-neighbors escalated following a suicide bombing in Indian-administered Kashmir in mid-February that left more than 40 Indian troops dead.

The attack was claimed by Jaish-e-Mohammed (JEM), a militant group that Pakistan has banned since 2002 but is accused by India of providing sanctuary to.

The two South Asian nations have fought three wars in 1948, 1965 and 1971 -- two of them over Kashmir -- since they were partitioned in 1947.