Pakistan carried out air strikes and shot down two Indian jets on Wednesday, Pakistani officials said, a day after Indian warplanes struck inside Pakistan for the first time since a war in 1971, prompting several world powers to urge both sides to show restraint.
Both countries have ordered air strikes over the last two days, the first time in history that two nuclear-armed powers have done so, while ground forces have exchanged fire in more than a dozen locations.
Tension has been elevated since a suicide car bombing by Pakistan-based militants in Indian-controlled Kashmir killed at least 40 Indian paramilitary police on Feb. 14, but the risk of conflict rose dramatically on Tuesday when India launched an air strike on what it said was a militant training base.
Pakistani Prime Minister Imran Khan called on Wednesday for talks with India and hoped "better sense" would prevail so that both sides could de-escalate.
"History tells us that wars are full of miscalculation. My question is that given the weapons we have can we afford miscalculation," Khan said during a brief televised broadcast to the nation. "We should sit down and talk."
India's attack on Tuesday had targeted the Jaish-e-Mohammed (JeM), the group that claimed credit for the suicide attack. India said a large number of JeM fighters had been killed, but Pakistani officials said the strike was a failure and inflicted no casualties.
Pakistan and India have fought three wars since independence from British colonial rule in 1947 and went to the brink a fourth in 2002 after a Pakistani militant attack on India's parliament.
The latest escalation marks a sudden turnaround in relations between the two countries, that both claim the mountainous Himalayan region of Kashmir in full but rule in part. As recently as November, Pakistan Khan spoke of "mending ties" with India.
U.S. Secretary of State Mike Pompeo spoke separately with the foreign ministers of India and Pakistan and urged them to avoid "further military activity" following Tuesday's air strike.
"I expressed to both ministers that we encourage India and Pakistan to exercise restraint, and avoid escalation at any cost," Pompeo said in a statement on Wednesday.
"I also encouraged both ministers to prioritize direct communication and avoid further military activity," he said.
Both China and the European Union have also called for restraint.
Many of the facts in the latest series of engagements are disputed by the two sides.
Major General Asif Ghafoor, a spokesman for the Pakistan armed forces, said Pakistan carried out six air strikes in Indian-occupied Kashmir after Indian jets had entered its airspace. India denies this, saying Pakistan has initiated the engagement by targeting military installations.
Describing the Pakistani air mission before the downing of the Indian jets, Ghafoor said Pakistani planes "locked" on Indian ground targets to demonstrate their capabilities to strike, but deliberately fired elsewhere on open spaces where there would be no casualties.
"This was not a retaliation in true sense, but to tell Pakistan has capability, we can do it, but we want to be responsible, we don't want an escalation, we don't want a war," Ghafoor told a news conference.
One of the aircraft fell on India's side of Kashmir, while the second came down in Pakistani-held territory with two pilots captured, he added.
Raveesh Kumar, a spokesman for India's foreign ministry, gave a different account, telling a news briefing that the Pakistan airstrikes on military targets had been "foiled".
India shot down one Pakistani plane that landed in Pakistani territory, and that it had lost one of its own planes, not two, with the pilot "missing in action", Kumar added.
"Pakistan has claimed that he is in their custody. We are ascertaining the facts," Kumar said.
At the Pakistani briefing, Ghafoor produced photographs of weapons and identity documents he said were carried by Indian pilots.
The Pakistan government's official Twitter account released a video of what it claimed was one of the Indian pilots who had been shot down.
The man, whose face is bloodied and blindfolded, gives his name and service number, before telling a man questioning him: "I'm sorry sir, that's all I'm supposed to tell you."
The Indian air force has ordered Kashmir's main airport in Srinagar along with at least three others in neighboring states to close, an official said.
Pakistan shut its airspace, with commercial flights in the country canceled. Flights from the Middle East and India were also affected.
In a separate incident, police officials in Indian-occupied Kashmir said that two Indian pilots and a civilian had died after an Indian aircraft crashed in Kashmir. The craft was initially reported by officials to be a plane, but a partial tail number from the craft seen by a Reuters witness showed it to be an nMi17 military helicopter.
The cause of the crash was unknown.
The aerial engagement followed overnight artillery fire by both sides. Pakistan used heavy calibre weapons in 12 to 15 places along the de facto border in Kashmir, known as the Line of Control (LoC), a spokesman for the Indian defense forces said on Wednesday.
"The Indian Army retaliated for effect and our focused fire resulted in severe destruction to five posts and number of casualties," the spokesman said.
Five Indian soldiers suffered minor wounds in the shelling that ended on Wednesday morning, he added.
"So far there are no (civilian) casualties but there is panic among people," said Rahul Yadav, the deputy commissioner of the Poonch district on the Indian side where some of the shelling took place.
"We have an evacuation plan in place and if need arises we will evacuate people to safer areas," he said.
Officials on the Pakistani side said at least four people had been killed and seven wounded, including civilians, with thousands evacuated and schools closed in border areas.
"Only those families are still here which have concrete bunkers built within or along their homes," said Muhammad Din, a resident of Chakothi, a village in Pakistan-occupied Kashmir near the de facto border.
India has also continued its crackdown on suspected militants operating in Kashmir, and on Wednesday security forces killed two Jaish militants in a gun battle, Indian police said.
The latest exchanges hit stock markets in both countries. Pakistani stocks fell sharply during morning trade with the benchmark KSE 100 Index down 3.34 percent and the narrower KMI 30 index down 3.6 percent in Karachi.
The Indian stock market was down around 0.5 percent, but the nervousness was evident in Mumbai. There was a visible increase in security levels in India's financial capital, which has suffered numerous militant attacks in the past.