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.