Image copyright Press Eye Image caption Martin McGuinness served as Northern Ireland's deputy first minister for ten years

Sinn Féin's Martin McGuinness, Northern Ireland's former deputy first minister, has died aged 66.

It is understood he had been suffering from a rare heart condition. His funeral will be in Derry on Thursday.

The former IRA leader turned peacemaker worked at the heart of the power-sharing government following the 1998 Good Friday Agreement.

The Queen is sending a private message to Mr McGuinness' widow, Buckingham Palace confirmed.

Among the seismic moments in his time in government was the famous handshake with the Queen in 2012 and a toast to her Majesty at Windsor Castle.

The meeting was particularly symbolic as the IRA murdered the Queen's cousin, Lord Mountbatten, while he was on holiday in the Republic of Ireland in 1979.

Colin Parry, whose 12-year-old son, Tim, died in an IRA bomb in Warrington in 1993, said that although he did not forgive the IRA or Martin McGuinness, he found him a man who was "sincere in his desire for peace".

Mr McGuinness became deputy first minister in 2007, standing alongside Democratic Unionist Party leaders Ian Paisley, Peter Robinson and Arlene Foster.

He died in the early hours of Tuesday in a Londonderry hospital with his family by his side.

Media playback is unsupported on your device Media caption A look back at the life of Martin McGuinness

The Northern Ireland Assembly will be recalled on Wednesday due to Mr McGuinness' death.

A visibly ailing Mr McGuinness stood down from his post in January to protest against the DUP's handling of an energy scandal, in a move that triggered a snap election.

BBC News NI Political Correspondent Enda McClafferty

"Bogside Republicans never retire," a defiant but tearful Martin McGuinness told his supporters on the night he called time on his political career.

He never travelled far from his roots but his political journey took him far beyond the comfort of Derry's Bogside.

But Sinn Féin's one-time chief negotiator always found his toughest negotiation was with his own people, especially in his home city where he faced threats from dissident republicans.

Read more here.

Sinn Féin president Gerry Adams said: "Throughout his life Martin showed great determination, dignity and humility and it was no different during his short illness.

Media playback is unsupported on your device Media caption Sinn Fein leaders Gerry Adams and Michelle O'Neill pay tribute to Martin McGuinness

"He was a passionate republican who worked tirelessly for peace and reconciliation and for the re-unification of his country.

"But above all he loved his family and the people of Derry and he was immensely proud of both."

Sinn Féin's northern leader Michelle O'Neill said: "I have known him since I was a child but I am honoured to have worked alongside him. He inspired me and many others."

Image copyright Justin Kernoghan Image caption An Irish flag flies at half mast in Derry's Bogside area

Prime Minister Theresa May said although she could never "condone the path he took in the earlier part of his life, Martin McGuinness ultimately played a defining role in leading the republican movement away from violence".

"In doing so, he made an essential and historic contribution to the extraordinary journey of Northern Ireland from conflict to peace," she added.

Former US president Bill Clinton said that as Sinn Féin's chief negotiator, Mr McGuinness' "integrity and willingness to engage in principled compromise were invaluable in reaching the Good Friday Agreement".

Media playback is unsupported on your device Media caption Lord Tebbit said Martin McGuinness was "a coward, a murderer"

Former Conservative cabinet minister Lord Tebbit, who was injured and whose wife was paralysed by an IRA bomb in Brighton's Grand Hotel in 1984, described Mr McGuinness as "a coward".

"The reason he suddenly became a man of peace, was that he was desperately afraid that he was going to be arrested and charged with a number of murders."

Julie Hambleton, whose sister, Maxine, was one of the 21 people killed in the Birmingham pub bombings in 1974, said "with his death, the truth is buried".

"Mr McGuinness was very fortunate because he was able to live a full life unlike my sister, unlike 20 other victims and unlike so many other thousands of people who were murdered."

Media playback is unsupported on your device Media caption Colin Parry: "I don't forgive Martin. I don't forgive the IRA"

BBC News NI Home Affairs Correspondent Vincent Kearney

No-one knows how many people Martin McGuinness killed, directly or indirectly.

As a senior commander in the Provisional IRA for many years, there is no doubt there was blood on his hands.

Security sources say he went on to become chief of staff of the organisation from the early 1980s, right through until the end of the IRA's campaign of violence.

Nothing happened in Derry without him knowing.

Read more here:

Northern Ireland's Chief Constable George Hamilton said: "Martin's journey in life challenges all of us who care about the future; to be prepared to change; to demonstrate leadership; and to work to understand the world, not just from our own perspective, but from the perspectives of everyone in our community."

Media playback is unsupported on your device Media caption DUP leader Arlene Foster said McGuinness wanted to see Stormont succeed

Northern Ireland's former first minister Arlene Foster called him "first and foremost, a much loved husband, father and grandfather."

Media playback is unsupported on your device Media caption Tony Blair tells BBC's Today programme what made Martin McGuinness formidable foe also made him formidable peacemaker

Taoiseach (Irish prime minister) Enda Kenny said his passing represented a "significant loss, not only to politics in Northern Ireland, but to the wider political landscape on this island and beyond".

DUP MP Nigel Dodds, who survived an IRA gun attack in Belfast in 1996 as he was visiting his sick child in hospital, said: "We can't forget his past.... This will also be a difficult day for victims. But he did help move people forward when it comes to the peace process."

Image caption Mr McGuinness resigned in January in protest against the DUP's handling of an energy scandal

Martin McGuinness grew up in Derry's Bogside, radicalised, he said, by discrimination and murder on the streets of his city.

Image copyright Pacemaker Image caption Gerry Adams and Martin McGuinness at the 1987 funerals of two IRA men in Derry

He had a leading role in the IRA during a time when the paramilitary organisation was bombing his home city.

Image copyright Pacemaker Image caption A book of condolence has been opened in Derry's Guildhall for Mr McGuinness

Image copyright Pacemaker Image caption Mr McGuinness leaves Crumlin Road Jail in 1985 after serving a sentence for failure to pay fines

He was convicted by the Republic of Ireland's Special Criminal Court after being arrested near a car containing explosives and ammunition. He served two prison sentences - he was also convicted of IRA membership.

But his leadership potential was spotted early and he was just 22 when he and Gerry Adams were flown to London for secret talks with the British government: MI5 considered him serious officer material with strategic vision.

Media playback is unsupported on your device Media caption Martin McGuinness, from paramilitary to politician

The shift to politics came slowly. Martin McGuinness was chief negotiator in the blossoming peace process and took on the post of education minister.

By 2007, he was Northern Ireland's deputy first minister standing alongside First Minister Ian Paisley. The two forged an unlikely alliance - but they were working together for the same goal.

Image copyright Pacemaker Image caption The Queen and Martin McGuinness shook hands in public in 2012 in what was seen as a 'seismic moment' in his political journey

He worked alongside DUP first minister Peter Robinson and, until January, was in office with Arlene Foster.

In recent years, he said: "My war is over. My job as a political leader is to prevent that war and I feel very passionate about it."

Media playback is unsupported on your device Media caption Martin McGuinness 'entered government an unrepentant terrorist'

Mr McGuinness' funeral will leave his home on Thursday at 13:20 GMT ahead of Requiem Mass at St Columba's Church Longtower at 14::00 GMT. He will be buried in the City Cemetery.