McGuinness' decade as deputy first minister
One-time IRA commander Martin McGuinness went from the riots of the Bogside in Londonderry during the 1970s, to the very heart of government.
He became one of Sinn Féin's two ministers in the first power-sharing deal that followed the Good Friday Agreement.
In the Stormont Assembly election of May 2007, he was elected deputy first minister, with the Democratic Unionist Party leader Ian Paisley as first minister.
Many people were surprised at how well the two leaders appeared to get on.
They were labelled the "Chuckle Brothers" as a result of being frequently photographed laughing and smiling together.
Martin McGuinness stood down temporarily as deputy first minister to contest the Irish presidential election in 2011, when his IRA past received much attention in the media.
He came third in the election in which he was the only candidate who, as a non-resident, was ineligible to vote.
In 2008, he went to Baghdad to share his knowledge of peace-making.
In recent years, Martin McGuinness insisted his job had become a political one.
"My war is over. My job as a political leader is to prevent that war and I feel very passionate about it," he said.
"I want to build a better future for all our people. It is a political project, not a military one."
In 2008, McGuinness and Ian Paisley's successor Peter Robinson were nominated as first and deputy first minister.
Their relationship was less amicable than the one between McGuinness and Paisley, who died in September 2014.
The following year, Robinson and McGuinness became embroiled in controversy over the £1.2bn sale by Nama of its Northern Ireland property loans portfolio to US firm Cerberus.
In January 2016, Arlene Foster took over from Robinson as first minister of Northern Ireland.
In an interview a month later, Foster spoke of the difficulties she experienced with the deputy first minister, because of his graveside oration at the funeral of the man who, she believes, tried to kill her father.
Despite this - and the fact that the pair were on opposing sides of the subsequent Brexit vote - Mr McGuinness and Mrs Foster managed to forge a positive working relationship since they began sharing the OFMDFM portfolio.
In December, Mrs Foster insisted she had "nothing to hide" over the RHI scandal and refused to step down, but pressure mounted on Sinn Féin to act.
In January, Mr McGuinness said Mrs Foster should step aside as first minister to "allow a time-framed, comprehensive, independent investigation" into the RHI scheme. She refused.
So he instead resigned in protest against the DUP's handling of the debacle, sparking March's elections and Northern Ireland's current crisis.