LONDON — The British government will compensate relatives of victims of the 1972 Northern Ireland shootings by British troops that became known as “Bloody Sunday,” the Defense Ministry said on Thursday.

“We acknowledge the pain felt by these families for nearly 40 years, and that members of the armed forces acted wrongly,” a spokeswoman for the ministry said. “For that, the government is deeply sorry. We are in contact with the families’ solicitors and where there is a legal liability to pay compensation, we will do so.”

The announcement confirmed that the government was prepared to resolve claims by relatives of the 14 people who were killed by soldiers in a British parachute regiment as they marched in Londonderry on Jan. 30, 1972. Thirteen others were wounded on a day that became a bitter emblem of injustice over three decades of sectarian strife in Northern Ireland in a conflict that claimed more than 3,600 lives and spilled across Britain.

The agreement to make payouts came after the law firm that is representing most of the families wrote a letter to the British prime minister, David Cameron, in January, according to a statement Thursday from the firm, Madden and Finucane.