By Rajesh Roy in New Delhi and Saeed Shah in Islamabad, Pakistan, Wall Street Journal-

Indian warplanes bombed targets inside Pakistan for the first time since the now nuclear-armed rivals were at war in 1971, hitting what Indian officials described as a terrorist training camp after a Kashmiri militant killed 40 Indian paramilitary police officers.

Indian officials said the strikes killed hundreds of militants and caused no civilian casualties, while Pakistani officials and residents of the area reached by phone said the strikes hit mostly vacant land and left one person injured.

Pakistan’s military said the Indian planes attacked “in haste while escaping” from jets scrambled by the Pakistani air force in response to the incursion.

The strikes targeted an area near the town of Balakot, inside Pakistan rather than disputed territory in Kashmir controlled by the Pakistani military. In 2016, after a similar, though less deadly militant attack on Indian troops in Kashmir, India carried out strikes into the part of Kashmir Pakistan controls but didn’t strike Pakistan proper.

The strikes came after Indian Prime Minister Narendra Modi said he would retaliate after the suicide bombing attack killed the 40 Indian paramilitary officers in Kashmir earlier this month.

Jaish-e-Mohammad, which operates in Pakistan despite being officially banned by Islamabad, claimed responsibility for the attack. Pakistan denied any connection to the bombing and says terrorist groups don’t operate inside its borders.

Jaish-e-Mohammad has claimed responsibility for several previous attacks in India. Indian officials said the airstrikes were designed to prevent new terrorist attacks inside India they believe to be imminent.

Kashmir is claimed by both India and Pakistan, with each holding part of the region.

Tuesday’s strikes appeared calibrated as a more forceful response than India mounted in 2016, but also narrowly focused on targets India could justify as solely related to terrorist activities it accuses Pakistan of encouraging in Kashmir.

“They targeted only the Jaish camps, not the civilian targets, not army installations, not air force installations,” said Subramanyam Chandrasekharan, director of South Asia Analysis Group, a New Delhi-based think tank. “So in that way, I think this is the least India can do.”

He said Pakistan will likely respond in some fashion, but will likely take care to avoid further escalation.

“I feel it’s not going to risk open war,” he said. “I don’t think the international community will also allow the situation to escalate.”

The Indian missiles hit a forested, mountainous area above the remote village of Jaba, near the town of Balakot in Khyber Pakhtunkhwa province, according to nearby residents.

Locals said they heard about four bangs at around 3 a.m. that shook windows and doors, waking them up. The missiles fell about a half-hour walk uphill from the village, they said.

Villagers said the area targeted had housed a militant training camp in the era of Pervez Musharraf, the general who ruled Pakistan between 1999 and 2008. Now, they said, there was only a religious school, or madrassa, there.

The missiles landed several hundred yards from the school, residents said. More than 100 children study at the seminary, locals said, with most coming from outside the area, especially Punjab province—the region where Jaish also has its headquarters. The Pakistani military released pictures of some fallen trees and upturned earth, which it said had been caused by the Indian strikes, along with pictures of fragments of the missiles found there.

“Lots of trees have been damaged and there are craters in the ground where the missiles hit,” said one villager, adding that one local man had suffered a head injury from the wall of his house falling on him from the vibrations, but no one was killed.

The region around Balakot was known for housing militant training facilities in the past, including camps run by Jaish.

Write to Saeed Shah at saeed.shah@wsj.com