Martin McGuinness, an Irishman whose tactics of armed resistance and then political conciliation made him a hero to ­nationalists in Northern Ireland, where he fought to end British rule, negotiated a sweeping peace treaty and climbed to the top of the province’s political system, died March 21 in Derry, Northern Ireland. He was 66.

An announcement of Mr. McGuinness’s death by his political party, Sinn Fein, did not cite a specific cause.

Mr. McGuinness had been hospitalized in late February for ­amyloidosis, British and Irish news­papers reported. The disease causes an abnormal protein to build up in the heart and other organs, and it was one reason Mr. McGuinness resigned Jan. 9 from his post as deputy first minister, one of Northern Ireland’s two top ­political positions.

Mr. McGuinness was an equally stabilizing and polarizing force in Northern Ireland politics, where he had served as deputy first minister since 2007. The position is part of a power-sharing agreement that splits the British province’s executive branch between two long-warring factions: Catholic nationalists who seek to unite the north with its sovereign counterpart to the south, the Republic of Ireland, and Protestant loyalists who believe Northern Ireland ought to remain a part of Britain.

A former butcher’s apprentice, Mr. McGuinness was known for many years as a leading figure in the outlawed militant Irish ­Republican Army, which waged a nearly three-decade bombing campaign and guerrilla war against British authorities it viewed as illegal occupiers. More than 3,600 people were killed and thousands more were injured during the conflict.

(Reuters)

But it was as a statesman, not a gunman, that Mr. McGuinness helped bring an end to the conflict known as the Troubles. Working as lead negotiator for Sinn Fein, the IRA’s political arm, he helped forge the Good Friday Agreement of April 1998, which established Northern Ireland’s current political system and called for the IRA to set aside its weapons.

[From the archives: Historic promise of peace for N. Ireland (1998)]

British Prime Minister Theresa May said in a statement that while she could not condone the “path he took” earlier in life, he went on to make a historic contribution to the search for peace.

“While we certainly didn’t ­always see eye-to-eye even in later years, as deputy First Minister for nearly a decade, he was one of the pioneers of implementing cross community power sharing in Northern Ireland,” the statement said.

President Bill Clinton was among those issuing statements expressing sorrow. Queen Elizabeth II said she would send a private message to Mr. McGuinness’s widow.

Mr. McGuinness was inspired, he said, by the South African ­activist and president Nelson Mandela, a hero to Catholics in Northern Ireland who believed that Mandela’s struggle (and eventual victory) against apartheid mirrored their own battle against ­anti-Catholic discrimination.

“Before Mandela came out of prison he stretched out his hand in friendship to a people who had been arrogant, who had neglected the blacks, and who had been very narrow-minded,” Mr. McGuinness told the New York Times in 1994, shortly after the IRA announced a cease-fire that set Northern Ireland down the path toward peace. “We have got to do the same.”

Britain’s Queen Elizabeth II shakes hands in 2012 with Northern Ireland Deputy First Minister and former IRA commander Martin McGuinness watched by First Minister Peter Robinson, center, at the Lyric Theatre in Belfast. (Paul Faith/Associated Press)

Mr. McGuinness had served two stints in prison as an IRA member, once after being found with a car filled with 250 pounds of explosives and 5,000 rounds of ammunition. That tough-guy ­reputation allowed him to sell the peace deal to party members who resisted any agreement that did not include independence from Britain.

Separately, a willingness to compromise on domestic issues allowed him to find common ground with political partners who had once branded him a ­terrorist and whom his own ­militant group had sometimes nearly killed.

When Mr. McGuinness was swept into Northern Ireland’s ­executive office in 2007, after five years in which the Northern ­Ireland Assembly was suspended over power-sharing disputes, he was joined by a former enemy with a reputation for bigotry and obstinacy.

[From the archives: A timeline for the Troubles]

Yet Mr. McGuinness and Ian Paisley, a former Protestant minister who had refused to negotiate with Sinn Fein during the Good Friday peace process, soon became known as the “chuckle brothers” for their unexpectedly warm relations.

“These two had been complete enemies and wouldn’t have gone near each other, but they made a good team,” said Brian Walker, an emeritus professor of Irish politics at Queen’s University Belfast. “McGuinness and Paisley helped make the system work,” he added, noting that they presided at a time when Britain was parceling out additional political powers to Northern Ireland and demonstrated that a power-sharing form of government could succeed.

Mr. McGuinness’s relationships with his subsequent executive partners were less amiable, in large part because of his IRA background. Arlene Foster, his most recent partner as first minister, had ridden as a teenager aboard a school bus that was bombed by the IRA. Her father, a member of Northern Ireland’s British-aligned police force, had been shot in the head by an IRA member but survived.

Still, he seemed to yearn for the kind of Mandela-handshake moment he had spoken of years before. During Queen Elizabeth II’s first visit to Belfast, in 2012, he became perhaps the first former IRA leader to shake hands with Britain’s head of state. One of the queen’s cousins, Lord Louis Mountbatten, had been killed by the IRA in 1979 when his fishing boat was blown up .

In a speech the next day, Mr. McGuinness told Britain’s Parliament that the handshake “was in a very pointed, deliberate and symbolic way offering the hand of friendship” to loyalist supporters of the queen.

“Dialogue has replaced ­conflict,” he said. “Respect has ­replaced mistrust. What I want to see develop now and in the time ahead is a relationship based on equality and respect between our two islands for the first time in our history.”

James Martin Pacelli McGuinness was born May 23, 1950, in the Catholic Bogside neighborhood of Londonderry — or Derry, as it is known to Irish nationalists. His father worked at an iron foundry, and his mother was a homemaker.

He studied with the Christian Brothers, a religious order with republican political leanings, before leaving school at 15. He became radicalized, he later said, when he encountered anti-Catholic sentiment while looking for a job and saw police and soldiers’ violent response to Catholic protesters marching for civil rights.

Mr. McGuinness was a part-time rebel, throwing rocks at soldiers and police officers after getting off work, before joining the IRA’s Derry Brigade about 1970. He rose quickly through the ranks, attracting attention for his boyish looks and pointed justifications for force against the British.

“Ours is an offensive role,” he told the Times in 1972. “No one likes to kill. I don’t. But we’re at war. These people are invaders.”

Mr. McGuinness was the Derry Brigade’s second-in-command on Jan. 30, 1972, when 13 civilians were shot and killed by British soldiers during a civil rights march in Derry. (A 14th person later died of wounds.) The ­incident became known as Bloody Sunday.

Soldiers blamed the IRA for the deaths, saying armed ­members of the group instigated the violence. A government ­inquiry later found that the marchers were unarmed and the shootings were unjustified. In testimony Mr. McGuinness gave in 2002, he called the incident “the worst day that I had ever experienced in my life.”

In the year of the Derry incident, he traveled to London with a group that included Gerry Adams, another young republican leader and the future president of Sinn Fein, for secret meetings with Britain’s secretary of state for Northern Ireland. Mr. McGuinness was 22, and it was his first foray in peace talks.

He married Bernadette Canning in 1974. Besides his wife, survivors include four children.

According to news accounts, Mr. McGuinness remained active in the IRA through the 1980s, maintaining a high-level role similar to that of chief of staff. He did not publicly acknowledge membership in the group until 2001, and he insisted that he had left the IRA in 1974 to focus on politics through Sinn Fein.

Mr. McGuinness was elected to the Northern Ireland Assembly in 1982, during a four-year period in which Britain unsuccessfully attempted to restore representative government to the province, and was elected to the British House of Commons in 1997. He served in Parliament through 2013 without once taking his seat: As party policy, Sinn Fein members abstain from participating in British political institutions.

Mr. McGuinness was elected to the Northern Ireland Assembly following the passage of the Good Friday Agreement and served for several years as education minister, an appointed cabinet position.

Until his death, he remained optimistic about Irish unification and an advocate of politics as a means of peaceful revolution.

“I believe a united Ireland is inevitable. Absolutely,” he told Britain’s Guardian newspaper. “But I believe it can only happen by peaceful and democratic means.”