Pakistan's Civil Aviation Authority has closed the country's airspace as tensions with its nuclear rival India escalate.

Pakistan says it shot down two Indian jets and has one Indian pilot in custody and another in a military hospital because the aircraft crossed into Pakistan's side of the disputed Kashmir region.

India said that it had shot done one Pakistani jet as tensions escalate between the two nuclear powers, and said one if its pilots is "missing in action."

Pakistan also launched airstrikes into India-controlled Kashmir on Wednesday after India claimed to strike a militant training camp in Pakistan on Tuesday.

Tensions have escalated between the two nuclear powers since an attack earlier in February, and Pakistan has convened a meeting of its nuclear commanders while ground forces have exchanged fire in more than a dozen locations.

China, the European Union, and the US have urged restraint, while Pakistan's prime minister asked whether the two nations could "afford miscalculation" given their nuclear arsenals.

Pakistan's Civil Aviation Authority on Wednesday said it had closed the country's airspace to all commercial flights after the military said it shot down two Indian jets amid mounting tensions between the two nuclear rivals.

Pakistan's military earlier Wednesday said it had shot down two Indian aircraft that crossed into Pakistan's side of the disputed Kashmir region. A Pakistan Air Force spokesman, Maj. Gen. Asif Ghafoor, said the air force "shot down two Indian aircrafts inside Pakistani airspace."

But Raveesh Kumar, a spokesman for India's foreign ministry, disputed Pakistan's account, saying in a news briefing that Pakistan's air strikes on military targets had been "foiled," Reuters reported.

Ghafoor said the Pakistani army had an Indian pilot in custody. Ghafoor shared an image of a man, who he said was Indian Wing Comd Abhi Nandan and said he was "being treated as per norms of military ethics." Ghafoor also told The Associated Press that another Indian pilot was injured and was being treated in a military hospital

A representative for India's foreign ministry said that India shot down one Pakistan Air Force plane on Wednesday and that one Indian pilot was "missing in action." He said that Pakistan said it had the pilot in custody and that India would be "ascertaining the facts."

Pakistan International Airlines warned passengers in a Wednesday tweet that Pakistan's air-space closing might affect its flights.

This map from the flight tracker Flightradar 24 shows empty airspace above Pakistan on Wednesday compared with a month ago:

Tensions between the two rival countries have mounted since a terrorist attack in Kashmir that left 40 Indian troops dead on February 14. The two countries have ordered airstrikes against each other, the first time in history that two nuclear powers have done so, according to Reuters.

Ground forces have exchanged fire in more than a dozen locations, Reuters also reported.

Pakistani Prime Minister Imran Khan said at a press conference on Wednesday that the two countries "should sit down and talk." He urged "better sense to prevail."

Khan said that given the two nations' nuclear arsenals, "My question is that given the weapons we have can we afford miscalculation."

India on Tuesday said it had launched an airstrike on a militant training base in Pakistan, the Associated Press reported. India said its airstrikes killed as many as 300 Muslim separatist militants, but Pakistan says its air force scrambled fighter jets and chased India off.

Maj. Gen. Asif Ghafoor, a spokesman for the Pakistan Armed Forces, gave a news conference Wednesday amid escalating tensions with India. YouTube/ISPR Official

Pakistan immediately convened a meeting of its nuclear commanders after the attack.

Pakistan's air force launched airstrikes into the Indian-controlled part of Kashmir earlier Wednesday, though no civilian casualties were reported, according to the AP.

Read more: Pakistan hints at nuking India after cross-border airstrikes roil the white-hot feud

A representative for Pakistan's Ministry of Foreign Affairs said on Twitter on Wednesday that the "sole purpose of this action was to demonstrate our right, will and capability for self defence." Using the hashtag #PakistanStrikesBack, he added: "We do not wish to escalate but are fully prepared if forced into that paradigm."

Indian soldiers arriving near the wreckage of an Indian aircraft in Kashmir on Wednesday. AP Photo/Mukhtar Khan

India and Pakistan have fought wars over the disputed Kashmir territory. Both countries claim the region and rule parts of it.

China has urged Pakistan and India to avoid escalation. A Chinese Foreign Ministry spokesman, Lu Kang, told reporters on Wednesday that China hoped "they will keep in mind the regional peace and stability, exercise restraint, take effective measures to strengthen dialogue, and maintain two sides' fundamental interests and the regional peace and stability," Reuters reported.

US Secretary of State Mike Pompeo said in a statement on Wednesday that he had spoken separately with India and Pakistan's foreign ministers and urged them to avoid "further military activity" after Tuesday's conflict.

"I expressed to both ministers that we encourage India and Pakistan to exercise restraint, and avoid escalation at any cost," he said.