As a symbol and gesture of the Queen’s determination to pursue reconciliation in Northern Ireland, it was the handshake that made headlines around the world.
While the encounter itself lasted for mere seconds, the journey which led to setting up the historic meeting had been long and arduous.
The IRA had waged a terrorist campaign against the British establishment for years and the royal family was rocked when republicans murdered the Queen’s second cousin, Lord Mountbatten, in 1979.
He was killed along with three other people when the IRA detonated a bomb on his boat while he was on holiday in Co Sligo.
But the establishment of the peace process and the Good Friday Agreement in 1998 transformed the political situation in Northern Ireland and helped to improve the dynamic of Anglo-Irish relations.
In 2007 former IRA leader Mr McGuinness became Northern Ireland’s deputy First Minister after Sinn Fein and the unionist DUP agreed to share power at Stormont.
By May 2011 the Queen was able to take part in her historic first visit to the Republic of Ireland, an event laden with historic and healing gestures.
It also helped to lay the ground for what was to happen in Northern Ireland the following year.
It was planned that the Queen would visit Belfast as part of her Diamond Jubilee celebrations in June 2012.
On the itinerary was an event at the Lyric Theatre organised by the peace-building organisation Co-operation Ireland.
Co-operation Ireland chief executive Peter Sheridan said it was realised early on that there was the potential for something historic to occur at the event.
He said: “When the Queen came to Dublin the year before, Sinn Fein decided not to take part in it. But by the end of it, I think they had realised at some point they were going to have to engage.”
“The next opportunity was the Diamond Jubilee and she was going to be in Belfast.”
The event at the Lyric Theatre was centred around an exhibition of portraits of victims painted by Northern Ireland artist Colin Davidson.
Mr Sheridan said: “With the Queen and the President of Ireland, Michael D Higgins, being our joint patrons, we were inviting the two of them.
“And of course we were inviting the First and deputy First Minister, so that opened up the opportunity for Sinn Fein and Martin McGuinness to decide to take part.
It was courageous on one hand for someone to reach out their hand, it was equally courageous for the person on the other side to take that hand
Peter Sheridan, Co-operation Ireland
“I knew it was going to be a significant moment in history, because of the complexity of our past between these two islands and because the relationships had historically never been simple.
“And like all these things, right up until the last few hours you weren’t completely sure that people would turn up who said they would turn up.
“It was courageous on one hand for someone to reach out their hand, it was equally courageous for the person on the other side to take that hand.”
The first meeting between the Queen and Mr McGuinness took place privately within the theatre before a second handshake in public soon after.
Mr Sheridan said: “I remember thinking at the time that I wanted to take this in slow motion because I knew it was important, I tried to capture the moment in my own mind.
“Despite the extraordinary nature of it, one of the things that stood out was the very ordinariness it all.
“They met, smiled, said hello to each other.”
Only one photographer was permitted to capture the historic moment.
Former PA news agency photographer Paul Faith recalled how hours of waiting culminated in the handshake, which took less than four seconds.
He said: “I went to the Stormont Hotel to grab a bite to eat after I took the photo.
“There was the picture on the TV of Martin McGuinness shaking hands with the Queen and everyone in the restaurant stopped to look at it.
“They were all totally amazed, but nobody knew that I had captured it.
“It travelled so quickly, the image went all around the world.
“The next day the Irish Open golf was on and I was there.
“In the press room all of the newspapers were there.
“Everyone single one, local and national and international, had the picture on the front page.
“It was the first time I’d ever seen that.
“McGuinness came up to me and said that I had made him famous.”
It was a picture you just never thought you would see. When I was out doing jobs in the Troubles you never thought this was going to happen
PA news agency photographer Paul Faith
Mr Faith added: “It’s a history picture now, it has travelled the world and is part of our heritage now, part of the peace process.
“It was a picture you just never thought you would see.
“When I was out doing jobs in the Troubles you never thought this was going to happen.
“A picture paints a thousand words and it gave people a glimpse of what the future could be like.”
Mr McGuinness, who died in 2017, was later to say that the IRA murder of Lord Mountbatten was acknowledged in his private talks with the Queen.
Speaking weeks after the historic meeting, he told RTE: “I said to them that I recognised that they too had lost a loved one.
“I did not shy away from the issue because I think these are things that we need to face up to.
“I will not repeat what she said as that would not be proper, but she was absolutely understanding of the need for everybody to work together to ensure that we don’t go back to the past.
“She was very gracious about it.”
Mr Sheridan said the historic first meeting served as an illustration of how far Northern Ireland had come.
“I saw this as almost the cementing of the peace process – Sinn Fein and the head of state shaking hands.
“Words that stuck in my mind was something the Queen had said in Dublin Castle the year before -‘You can bow to the past, but not be bound by it’.
“I think what happened that day was a lived example of that.”