WAGAH, Pakistan (AP) — Pakistani officials handed over a captured Indian pilot to a border crossing with India on Friday in a “gesture of peace” promised by Pakistani Prime Minister Imran Khan amid a dramatic escalation with the country’s archrival over the disputed region of Kashmir.

The pilot, identified as Wing Commander Abhinandan Varthaman, was taken in a convoy that set out from the eastern Pakistani city of Lahore to the border crossing at Wagah earlier in the day, escorted by military vehicles with soldiers, their weapons drawn.

The Pakistani military has said his plane was downed on the Pakistani-held side of Kashmir on Wednesday.

Varthaman was accompanied to the border by the International Committee of the Red Cross. His handover took several hours as a roster of procedures were completed including a medical checkup to verify his health and condition before being handed over to his countrymen.

In a video message aired on Pakistani television channels, Varthaman was seen in his green flight suit saying he was rescued by two Pakistani military personnel when he ejected and found himself in Pakistani controlled Kashmir surrounded by a small mob of seemingly angry residents. It wasn’t clear when he recorded this statement, but it was clearly while he was in the custody of the Pakistan military.

On the Indian side of the border, Indian policemen and military personnel greeted Varthaman who was dressed in civilian clothes, wearing a blue blazer and gray dress pants.

Earlier in the day the road on the Indian side of the border was lined with well-wishers. But by the time Varthaman crossed around 9 p.m. local time most people had dispersed.

The handover came against the backdrop of blistering cross-border attacks across the disputed Himalayan region of Kashmir that continued for a fourth straight day, even as the two nuclear-armed neighbors sought to defuse their most serious confrontation in two decades.

Tens of thousands of Indian and Pakistani soldiers face off along the Kashmir boundary known as the Line of Control, in one of the world’s most volatile regions.

Tensions have been running high since Indian aircraft crossed into Pakistan on Tuesday carrying out what India called a pre-emptive strike against militants blamed for a Feb. 14 suicide bombing in Indian-controlled Kashmir that killed 40 Indian troops. Pakistan retaliated, shooting down two Indian aircraft Wednesday and capturing the pilot.

Since the escalation, world leaders have scrambled to head off an all-out war on the Asian subcontinent. President Donald Trump in Hanoi on Thursday said he had been involved in seeking to de-escalate the conflict.

Khan, the Pakistani premier, told lawmakers on Thursday, “We are releasing the Indian pilot as a goodwill gesture tomorrow.”

But India made it clear that the latest escalation has changed its strategy and that going forward, it will strike, including inside Pakistan, if they receive intelligence of an attack in the planning. Indian Prime Minister Narendra Modi earlier Thursday warned “India’s enemies are conspiring to create instability in the country through terror attacks.”

Also Friday, Pakistan’s civil aviation authority partially re-opened the country’s airspace, allowing travel to four major cities, another sign tensions with archrival India were de-escalating.

The agency issued a statement saying all domestic and international flights will be allowed to and from the cities of Karachi, Islamabad, Peshawar and Quetta. It said other airports, including the one located in the eastern city of Lahore that borders India, will remain closed until March 4.

Islamabad closed its air space on Wednesday after saying that Pakistan’s military shot down two Indian warplanes and captured the Indian pilot. The closures snarled air traffic.

Residents of the Pakistani border town of Chikhoti reported heavy shelling overnight and Friday morning. More than 200 people had fled to a military organized camp about 20 kilometers (16 miles) away from the border.

Police in the Indian-controlled Kashmir said one man was wounded and at least two civilian homes were damaged in the cross-border shelling.

Kashmir has been divided but claimed in its entirety by both India and Pakistan since almost immediately after the two countries’ creation in 1947. They have fought three wars, two directly over the disputed region.

____

Associated Press writers Kathy Gannon and Munir Ahmed in Islamabad, Roshan Mughal in Muzafarabad, Pakistan, Aijaz Hussain in Srinigar, India, and Ashok Sharma in New Delhi, India, contributed to this report.