WASHINGTON — In 2014, 40 Indian construction workers went missing outside the northern Iraqi city of Mosul. The city had fallen to the Islamic State militant group just days before. Relatives said they received panicked calls from some of the workers, begging for help.

Then, for years, nothing. But this week, Indian officials confirmed that the bodies of 39 of those workers were found in a mass grave near Mosul. Thirty-eight of them have been identified through DNA tests. Analysis on the last body is still underway. One of the 40 workers, Harjit Masih, had earlier managed to escape his captors.


‘‘With full proof, I can say these 39 are dead,’’ Sushma Swaraj, India’s external affairs minister, said on Tuesday.

The Indian government had long suggested that at least some of the hostages could still be alive. For years, though, that message was contradicted by Masih. He repeatedly told reporters that everyone in the group had been killed. He said the workers were captured by the Islamic State and held for several days. On the day of the slaughter, he said, the men were taken outside and forced to kneel. Then, he said, the militants began to shoot.

‘‘They were killed in front of my eyes,’’ he repeated Tuesday from his home in a northern Indian village.

Masih was shot in the thigh but managed to escape to Kurdish-controlled Irbil. Indian officials dispute that account, saying he survived by posing as a Muslim from Bangladesh.