The meeting with McGuinness, who is now the deputy first minister of Northern Ireland, comes 14 years after the Irish Republican Army ended its war against British rule in the province, and is one of the last big milestones in a peace process whose success has been studied around the world.
The queen met McGuinness, Northern Ireland's Unionist first minister Peter Robinson and Irish President Michael D.Higgins for just under 10 minutes behind closed doors in a theatre in a leafy suburb of Belfast cordoned off by hundreds of police.
McGuinness shook the gloved hand of the queen a second time as she left the theatre, this time in front of television cameras, but unlike other guests chose not to bow his head.
The queen's bright green outfit appeared to have been chosen with Ireland's national colour in mind, and McGuinness wished a smiling monarch well in Irish, saying "Slan agus beannacht", which he told her means "Goodbye and God speed".