A meeting between Sinn Fein and the Queen is the right decision and a step forward, Northern Ireland's First Minister Peter Robinson has said.
Sinn Fein agreed to the unprecedented meeting with the Queen following a special meeting of the party in Dublin.
Martin McGuinness is due to meet the Queen and shake her hand at a charity reception in Belfast next week.
Mr Robinson said it would "be a difficult ask for Her Majesty and a significant step for republicans".
Martin McGuinness, a 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.
In a statement on Friday evening, Peter Robinson said he had accepted an invitation to attend an event organised by Cooperation Ireland on Wednesday.
"I am glad that the deputy first minister has also accepted this invitation," he said.
"We recognise that this will be a difficult ask for Her Majesty The Queen and a significant step for republicans.
"The process has required us all to reach out and take decisions outside our comfort zone. It is the right decision and a step forward for Northern Ireland."
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.
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".
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.
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".
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."