BELFAST, Northern Ireland (CNN) -

Britain's Queen Elizabeth II shook hands Wednesday with former IRA commander Martin McGuinness in a historic gesture marking a giant step forward in the peace process relating to British rule of Northern Ireland.

The handshake came 14 years after the end of a conflict that claimed about 3,500 lives, including that of the queen's cousin Lord Louis Mountbatten in an IRA bombing.

McGuinness spoke to the queen in Irish as they clasped hands and made eye contact for several seconds in the ground-breaking public part of the event.

"Goodbye and godspeed," McGuinness said, translating his comment for the queen. She smiled throughout the encounter but did not speak.

The handshake followed a brief private meeting at which McGuinness told the queen their meeting was a powerful signal that peace-building requires leadership, his party, Sinn Fein, said.

He emphasized the need to acknowledge the pain of all victims of the conflict and their families, Sinn Fein said.

Queen Elizabeth wore green for the meeting, which observers saw as a subtle outreach to Irish nationalists, whose color is green.

"It went good, it went really well," McGuinness said afterwards, adding he is "still a republican" who opposes British rule of Northern Ireland.

Sinn Fein president Gerry Adams welcomed what he called a "historic meeting," saying that "all in all, it's a good day for Ireland and a good day for the people of these islands."

Speaking outside the Irish parliament, he said: "It brings our journey of relationship building within this island and between these islands onto a new plane. I would like to think we will build upon that."

Adams said some issues remained to be resolved, particularly the legacy of the conflict and the need for the relatives of those killed by British armed forces to have the facts investigated by an inquiry.

But, he said, he believes the vast majority of unionists would be pleased that it was a "real gesture beyond the rhetoric towards their sense of identity and their sense of allegiance."

The organizer of the event called the handshake "a significant milestone on the road to reconciliation on this island and between our two islands."

Peter Sheridan, the chief executive of Co-operation Ireland, said he was struck by "the ordinariness of the handshake by people who are in no way ordinary."

McGuinness has been a key player in ending the conflict between pro- and anti-British forces in Northern Ireland. Unionists want the province to remain under British control, while republicans want it to join the Republic of Ireland.

Three decades of violence over the question largely came to an end with the Good Friday peace deal in 1998.

The violent period known locally as The Troubles was marked by a full-scale British military presence in the province and deadly bombings and shootings in Northern Ireland and Britain.

Unionists and republicans committed terrible violence against each other and against perceived traitors in their own ranks. A handful of people who disappeared during the Troubles have never been found.

The queen arrived in Northern Ireland on Tuesday for a two-day visit marking her Diamond Jubilee, 60 years on the throne.

She met McGuinness, now the deputy first minister of Northern Ireland, at an arts event in Belfast. Irish President Michael Higgins also attended the event.

There were clashes between police and demonstrators late Tuesday night ahead of the visit, police said.

Nine officers sustained "minor injuries" when they were attacked with "missiles including 21 petrol bombs" from a crowd of about 100 people, police said.

There were also scuffles between pro- and anti-British groups in Belfast Tuesday night over an Irish flag put up on a mountain overlooking the city in protest of the Queen's visit, the Police Service of Northern Ireland said Wednesday.

On Tuesday, the queen was greeted in Enniskillen -- the scene of a deadly IRA bombing in 1987 -- by crowds lining the streets and waving Union flags.

She was greeted by Secretary of State for Northern Ireland Owen Paterson, who accompanied her to a jubilee thanksgiving service at St. Macartin's Cathedral, an Anglican church, that was attended by more than 700 people.