LONDON — An Irish nationalist lawmaker has resigned from Britain’s Parliament after sparking outrage by appearing to mock a massacre carried out during Northern Ireland’s decades of violence.

Sinn Féin legislator Barry McElduff was shown in a Twitter video with a loaf of Kingsmill brand bread on his head, on the anniversary of the 1976 murder of 10 Protestant workmen by IRA militants in the village of Kingsmill.

One other man was seriously injured, while the one Catholic in the group was spared. The IRA said the murders were in response to two attacks on Catholics the previous day, which left six people dead.

Over 3,500 people were killed in Northern Ireland between 1968-1998 in what was known locally as “The Troubles.”

The 1998 Good Friday Agreement brought most of the hostilities to an end, and paved the way for a power-sharing agreement between Catholic and Protestant political parties.

The leader of Sinn Féin in Northern Ireland, Michelle O’Neill, said the tweet was “ill-judged, indefensible and caused hurt and pain to the victims of Kingsmill, that it falls far short of the standard expected of Sinn Féin representatives and our members.”

McElduff said the video wasn’t a reference to the slayings. But he was suspended by Sinn Féin and quit his seat Monday in Parliament. He apologized for the “deep and unnecessary hurt” his video had caused.

“I again offer my profound apology to those families and to the wider victims’ community,” he said in a statement.

“Had I been conscious of the connection to the terrible atrocity at Kingsmill I would certainly not have posted that tweet. I genuinely did not make that connection, not for a second did I make that connection in my mind. Kingsmill was wrong, unjustifiable and sectarian. It should never have happened,” McElduff said.

The episode strained Catholic-Protestant relations in Northern Ireland at a delicate time. The power-sharing Belfast administration has been suspended for a year amid a feud between Sinn Féin and the predominantly Protestant Democratic Unionist Party.

Sinn Féin has historic ties to the IRA, and its representatives do not actually take their seats in the Westminster parliament, since it requires an oath to the British monarch.

“I am an Irish republican and believe whole heartedly in the reunification of our country and an agreed Ireland in which we heal the wounds of the past together,” McElduff said.

“Reconciliation is essential, but that message is not being heard at this time. I do not wish to be a barrier to reconciliation and healing and in that spirit I again offer my sincere apologies to the survivors and families of those murdered at Kingsmill,” he said.

Alan Black, the lone survivor of the Kingsmill massacre, said McElduff must have known what he was doing when he posted the video.

“He’s a very astute politician. He’s a very clever man. Everyone, with the inquest ongoing, the Kingsmill murders have been in the media quite a lot this past couple of years,” Black told RTE Radio.

Black was shot 18 times in the attack, and told the radio station he had “great loyalty” to his friends who were murdered that day. He said McElduff was “depraved” in posting the video.

“He done it deliberately to cause hurt and he succeeded in spades in the hurt that he caused,” he said.

Crux staff contributed to this report.