Martin McGuinness death: Boy from the Bogside who ended up shaking hands with the Queen
The gunman-turned-statesman's 45-year journey to be deputy to three DUP First Ministers foundered on his dysfunctional relationship with Arlene Foster, says Clodagh Sheehy
Terrorist turned statesman Martin McGuinness walked a political tightrope for the last decade of his life. That rope snapped with the appointment of Arlene Foster as First Minister.
McGuinness called the decade "difficult and testing years" when, as Deputy First Minister, he shared power with successive DUP leaders.
During that time, he surprisingly formed a deep friendship with the first leader - his one-time enemy Ian Paisley. He managed to find common ground with the second - Peter Robinson - who was considered to be even more anti-republican than his predecessor.
Working with the third - Arlene Foster - proved impossible.
McGuinness resigned on January 9 and triggered an election. He announced his resignation from politics 10 days later, citing ill-health.
The man once described as "Britain's number one terrorist" had moved from his top post in the IRA to take a major role in the peace process.
He never denied his previous IRA activity, declaring he was "proud that I was a member of the IRA". He explained that, at the time in Londonderry, "we found ourselves in a situation where the British Army and the RUC were on our streets murdering our citizens.
"I was among a group of many young people, supported by many thousands of people in the city, who were prepared to stand against them. I am not ashamed of that. I think it was the right thing to do."
He was "equally proud", however, of the role he played over 25 years "in developing the peace process that has changed all that".
McGuinness was born on May 23, 1950, and came from a poor background. He was the second-eldest of seven children and the family of nine lived in a two-bedroomed house in the Bogside. He left school at 15.
The shooting dead of two Catholics by soldiers on a single day in Londonderry confirmed McGuinness' determination to become an IRA activist.
The young man quickly rose through the IRA ranks and was second-in-command at the time of Bloody Sunday on January 30, 1972, when the Parachute Regiment shot dead 14 unarmed civilians at a civil rights march.
Over the previous 16 months, a total of 26 British solders had been killed by the Provisionals in the city.
During his long public career, McGuinness consistently refused to say how many people he might have killed while in the IRA.
"I never talk about shooting anybody. But I do acknowledge that I was a member of the IRA and as a member of the IRA I obviously engaged in fighting back against the British Army."
His first attempt at peacemaking was in July of 1972 as part of a seven-member IRA delegation flown to London to meet Northern Ireland Secretary of State, William Whitelaw. The talks were unsuccessful.
A year later, his membership of the IRA was publicly confirmed at the Special Criminal Court in Dublin, which sentenced him to six months in prison for IRA membership. He had been caught in a car with a large quantity of explosives and ammunition and refused to recognise the court, declaring he was a member of the IRA.
Shortly after his release, he married Bernadette Canning and the couple had two sons, Emmet and Fiachra, and two daughters, Grainne and Fionnuala. Fast-forward a decade and McGuinness had changed to the view that politics was the best way in order to make progress.
He stood for election to the House of Commons. It took three attempts before he was finally elected in 1997 to represent the constituency of Mid Ulster.
Even then he refused to take the seat for Sinn Fein in line with party policy, as it would have involved swearing an oath of allegiance to the Crown.
During the 1990s, he was the IRA's chief negotiator in secret talks that ultimately brought about the Good Friday Agreement in 1998.
The Agreement led to the Northern Ireland Assembly and McGuinness was appointed Minister of Education in that very short-lived government.
A new agreement was reached in 2007 and Sinn Fein and the Democratic Unionist Party, as the two largest parties in the Assembly, formed a power-sharing Executive. DUP leader Ian Paisley became First Minister and McGuinness was appointed Deputy First Minister, a post he held for the next 10 years.
He briefly stepped aside in 2011 to contest the Irish Presidential election, but when he came third in that race, he returned to the Assembly within days.
McGuinness said his goal during his years as Deputy First Minister was to "seek resolutions rather than recrimination" despite the two power-sharing parties being "diametrically opposed ideologically and politically".
A public confirmation of this came on June 27, 2012, when he shook hands with the Queen during her visit to Belfast.
He said afterwards that, in doing so, "I am effectively, symbolically, shaking the hands of hundreds of thousands of unionists".
When Arlene Foster took over as First Minister, the relationship between the two leaders became increasingly strained.
McGuinness finally spoke frankly in his resignation letter where he referred to the "deep seated arrogance" of Foster and how this was "inflicting enormous damage on the Executive, the Assembly and the entire public body".
He revealed the "deep personal frustration" he had felt over the previous years, when his efforts to find resolutions were "not always reciprocated by unionist leaders" and at times "met with outright rejection".
This was despite his being "stretched and challenged by republicans and nationalists in my determination to reach out to our unionist neighbours".
The former Deputy First Minister kept his personal life very private throughout his career. A teetotaler, he was a big sports fan.
He had played both Gaelic football and hurling in his youth, was a Manchester United supporter, had a special interest in cricket and a passion for fly-fishing.
Speculation about McGuinness' health started circulating towards the end of last year when he withdrew from a planned visit to China on medical advice.
He was furious when newspapers published reports that he was suffering from a genetic disease called amyloidosis, which affects the heart and other organs.
Despite looking quite ill in television appearances, he insisted he had a right to privacy about his medical condition.
He also denied that his decision to quit had anything to do with health problems.
He said he was reluctantly stepping down because of Foster's refusal to stand aside pending a preliminary report into the controversial Renewable Heat Incentive that could cost taxpayers £490m.
On January 19, 2017, McGuinness announced his retirement from politics and admitted "unfortunately I have been taken seriously ill".
He was determined to overcome the illness, he added, but "the reality is that I am not physically able to put the energy and effort that is needed into this election so I will not be standing in the election".
He told his supporters he was "heartbroken" by the decision.
Of his time in the IRA, he said he did regret that people lost their lives but did not apologise for fighting for people's civil rights.
"The difficulty is that we effectively ended up in what was a vicious cycle of conflict in which and awful lot of people got hurt and an awful lot of people got killed, British soldiers, innocent civilians and defenceless prisoners".
He hoped, he said, that history would judge him fairly.