The queen shook hands with former IRA commander Martin McGuinness on Wednesday in a landmark moment in the Northern Ireland peace process, Buckingham Palace said.
The initial handshake between the queen and McGuinness, now deputy first minister of the province, took place away from the media spotlight behind closed doors in a Belfast theatre.
The two then shook hands a second time for the cameras as the queen left the building.
McGuinness held the monarch's hand for a few moments, spoke to her in Irish and told her the words meant: "Goodbye and God speed."
The meeting is seen as an important milestone in Anglo-Irish relations after three decades of sectarian violence, known as "The Troubles", which largely ended with the Good Friday peace agreement in 1998.
A spokesman for David Cameron said the handshake had "taken relations between the two countries to a new level".
It comes on the second day of the queen's visit to the province, which on Tuesday took her to Enniskillen, the scene of a notorious 1987 IRA bombing which killed 11 people.
McGuinness was a commander in the IRA when the paramilitary group killed the queen's cousin Louis Mountbatten in 1979 by bombing his boat while he was on holiday in County Sligo in the Republic of Ireland.
His Sinn Fein party, the political wing of the now-defunct IRA, continues to reject British rule.
In the eyes of republicans, the queen is commander-in-chief of an army that killed 13 people during a civil rights march in 1972, an event known as Bloody Sunday.
Earlier this week McGuinness said that by shaking the queen's hand he would be "shaking the hands of hundreds of thousands of unionists".
The initial handshake came in a meeting when they were joined by Prince Philip, Northern Ireland first minister Peter Robinson, Irish President Michael D Higgins and his wife Sabina for the highly symbolic moment, on the sidelines of a cross-border charity arts event.
Signs of the former tensions resurfaced overnight when around 100 missile-throwing youths clashed with police in Belfast, injuring nine officers. Police said more than 20 petrol bombs were thrown in the Broadway area of the city.
Earlier there was unrest in the west of Belfast after Republicans erected a flag and sign saying "Eriu is our queen", referring to a goddess of Irish mythology.
The queen and Prince Philip received a warm welcome, however, when they arrived by helicopter in Enniskillen on Tuesday, where flag-waving crowds of supporters lined the streets to greet them.
During the day they attended a service of thanksgiving at the city's St Maccartin's Church of Ireland Cathedral, along with Protestant and Catholic clergy.
Afterwards, in a potent gesture of conciliation, they stepped across the road to St Michael's Catholic Church. It is believed to be the queen's first visit to a Catholic church in Northern Ireland.
The two-day trip is part of the queen's diamond jubilee celebrations, marking her 60th year on the throne and is her 20th visit to the province.
On Wednesday the 86-year-old monarch and her husband will also join 22,000 guests for a garden party in the grounds of Stormont, Northern Ireland's parliament buildings.
Source: AFP European Edition