Indian people hold placards and photographs of Indian Air Force pilot Abhinandan Varthaman, as they celebrate the announcement of his soon release, in Amritsar on February 28, 2019.

Pakistan handed a captured Indian pilot back to his country on Friday as the nuclear-armed neighbors scaled back their confrontation, at least temporarily.

Television footage showed Wing Commander Abhinandan walking across the border near the town of Wagah just before 9.00 p.m. (1600 GMT). Indian officials confirmed he had been returned and said he would be taken for medical checks.

Abhinandan was shot down on Wednesday while flying a MiG-21 fighter jet that crashed in Pakistani territory after a dogfight with a Pakistani JF-17.

World powers have urged restraint from the two nations, as tensions escalated following a suicide car bombing that killed at least 40 Indian paramilitary police in Indian-controlled Kashmir on Feb. 14.

Pakistani Foreign Minister Shah Mahmood Qureshi said earlier on Friday the pilot would be released "as a gesture of peace and to de-escalate matters."

Before the pilot was released, Pakistani television stations broadcast video of him, looking cleaned up, thanking the Pakistani army for treating him well.

"The Pakistani army is a very professional service," he said.

Throughout the day, crowds on the Indian side thronged the road to the crossing, shouting nationalist slogans and waving Indian flags.

"Pakistan is releasing our pilot, I thank them for that," said Kulwant Singh, who has run a food stall at the crossing for 20 years.

"War can never be good. War is bad for business, war is bad for our soldiers."

The disputed Himalayan region of Kashmir has been at the root of two of the three wars fought between India and Pakistan since they gained independence from Britain in 1947.

There was some firing along the contested border dividing Kashmir on Friday, according to a spokesman for India's defence ministry, but the hostilities were well short of previous days.

Pakistan reopened some airports on Friday, after easing airspace restrictions that had disrupted flights between Asia and Europe for several days during the conflict.

Relations between the two countries, however, remain strained. Qureshi said he would not attend a meeting of foreign ministers from the

Organisation of Islamic Cooperation in Abu Dhabi this weekend, because his Indian counterpart had been invited to the event.

India also faces an ongoing battle against armed militants in its portion of Kashmir. On Friday, four security personnel and a civilian were killed in a gun battle with militants, officials said.