Sinn Fein has agreed to a historic first meeting with the Queen following a special meeting of the party.

Martin McGuinness is due to meet the Queen and shake her hand at a charity reception in Belfast next week.

The former IRA leader has been a major figure in the Irish peace process and has been deputy first minister of Northern Ireland for five years.

Northern Ireland Secretary Owen Paterson said the meeting would be a "most significant event".

The BBC's Ireland correspondent Mark Simpson said it would once have been unthinkable.

In the past, Sinn Fein leaders boycotted royal visits to Ireland and the Irish Republican Army (IRA) targeted members of the Royal Family.

In 1979, the paramilitary group murdered the Queen's cousin, Lord Mountbatten, while he was on holiday in the Republic of Ireland.

'Symbolic'

However, following the Queen's highly successful state visit to the Irish Republic last May, there has been mounting speculation that she would meet Sinn Fein.

Speaking after Friday's Sinn Fein meeting in Dublin, party president Gerry Adams described the decision as "good for Ireland" and "the right thing to do at the right time and for the right reasons".

Analysis The Queen has been to Northern Ireland 19 times. Her next visit is likely to be the most significant. There is no shortage of reasons for her and Martin McGuinness not to meet. The IRA killing of Lord Mountbatten hit the Royal Family hard. Irish republicans have traditionally shunned anything to do with the British establishment. But the peace process has changed almost everything. The once unthinkable is now possible.

Mr Adams said the decision was a "significant initiative, involving major political and symbolic challenges for Irish republicanism".

However, he said it reflected Sinn Fein's "genuine desire to embrace our unionist neighbours".

Mr Paterson said it was "right that the Queen should meet representatives from all parts of the community".

"Today's news will ensure that next week's visit will move Northern Ireland a whole new step forward," he said.

The BBC's royal correspondent Nicholas Witchell said it has recently become "inevitable" that the Queen "would meet a man who has now embraced the democratic process" during her Diamond Jubilee tour.

He said that Sinn Fein was "badly wrong-footed" during the Queen's visit to the Republic last year, when she made significant gestures including speaking in Irish and laying a wreath in memory of Irish rebels who died fighting for independence from Britain.

At the time, Sinn Fein had opposed her visit, and our correspondent said the party had been criticised for snubbing the Queen.

He said a reception organised by the cross-border charity Co-operation Ireland had provided a helpful backdrop for next week's highly symbolic meeting.

Peace-building

Mr McGuinness and Northern Ireland's First Minister, Peter Robinson, have been invited to attend the reception along with the Queen and the Irish President Michael D Higgins.

The Queen is joint patron of Co-operation Ireland with the Irish President.

The peace-building charity was established in 1979 and works to promote good relations between Catholics and Protestants on both sides of the Irish border.

The reception will coincide with the Queen's visit to Northern Ireland, but is not part of her scheduled programme of Jubilee celebrations.

The chairman of Co-operation Ireland, Peter Sheridan, was once the most senior Catholic police officer in Northern Ireland.

Mr Sheridan said the meeting between the Queen and Mr McGuinness was "part of the healing process" and would demonstrate "that we have gotten to the stage where we can acknowledge each other with respect".

The Democratic Unionist Party (DUP), which is Sinn Fein' main partner in Northern Ireland's power-sharing coalition government, welcomed the move as "a step in the right direction".

'Bitter history'

Jeffrey Donaldson, from the DUP, said: "We acknowledge the suffering of all those who have been victims of the terrorist violence during the Troubles, but we're also looking to the future in Northern Ireland - a shared future - and it's welcome that Martin McGuinness is recognising Her Majesty the Queen as our head of state."

Peter Hain, a former Secretary of State for Northern Ireland said: "Despite the history, the bitter history, which has involved royals as well - of course I think of Earl Mountbatten's assassination by the IRA - I think despite that bitter history, what this really puts the seal on is that the past is the past."

Former Sinn Fein publicity director Danny Morrison said he was in favour of a public handshake taking place between the Queen and Mr McGuinness.

"It's a huge advance in terms of symbolism," he said.

"Myself and others organised a 'Queen of Death' march in 1977, as we viewed the Queen coming over here as a triumphalist endorsement of the state forces in their war against the republican community.

"We had a peaceful march which was attacked with plastic and rubber bullets - we were enraged back then, and there's hurt on all sides."