Irish President Michael D Higgins has spoken of his country's "deep and enduring" friendship with Britain.
Speaking in Westminster during the first state visit to the UK by an Irish head of state, he said both countries could take "immense pride" in their work towards peace in Northern Ireland.
But he said there was "still a road to be travelled" to reach lasting peace.
At a banquet in his honour at Windsor Castle the Queen hailed the UK and Ireland as "neighbours and friends".
She said the nations should "no longer allow our past to ensnare our future".
Earlier, Mr Higgins was greeted at the Irish embassy in London by Prince Charles before heading to Windsor, where he shook hands with the Queen and Prince Philip.
The ceremonial welcome at Windsor Castle was marked by a 21-gun salute, military bands, and marching troops.
Mr Higgins then visited Westminster Abbey and laid a wreath at the Grave of the Unknown Warrior - the tomb of a British soldier of World War One. This is customary on state visits.
He and his wife Sabina also stopped to look at a memorial to the Queen's cousin, Earl Mountbatten of Burma, who was killed by an IRA bomb in 1979.
In a speech to both Houses of Parliament in the Palace of Westminster, Mr Higgins said: "I stand here at a time when the relationship between our two islands has, as I have said, achieved a closeness and warmth that once seemed unachievable."
He spoke of the "pain and sacrifice" associated with Irish independence from the UK in 1922, which he said had cast a "long shadow across our relations".
"We acknowledge that past but, even more, we wholeheartedly welcome the considerable achievement of today's reality - the mutual respect, friendship and co-operation which exists between our two countries," he said.
Mr Higgins's trip comes after the Queen became the first British monarch to visit the Republic of Ireland three years ago.
Then Sinn Fein did not take part, but Northern Ireland's deputy first minister Martin McGuinness, a former IRA commander, attended the banquet on Tuesday evening - where he joined in a toast to the Queen, the Duke of Edinburgh and the people of the UK.
During the banquet, Mr Higgins again spoke of Ireland's journey to "true reconciliation" with the UK.
He said: "Ireland and Britain live in both the shadow and in the shelter of one another, and so it has been since the dawn of history.
"We celebrate what has been achieved but we must also constantly renew our commitment to a process that requires vigilance and care."
During his visit, which ends on Friday, Mr Higgins is also due to meet Prime Minister David Cameron at Downing Street, pay tribute to the work of Irish health professionals, and meet business leaders and London Mayor Boris Johnson.
The president, who came to England to work as a waiter when he was 21, said his visit was "very important for the relationships between the people of Ireland and UK".
He will be joined on the trip by Taoiseach Enda Kenny and Foreign Affairs Minister Eamon Gilmore.
BBC Ireland correspondent Andy Martin said the trip could not have happened 20 years ago because of "lingering acrimony" between the two countries.
Our correspondent added that "changed entirely three years ago", when the Queen laid a wreath at a memorial to those who died fighting for Ireland's independence.
Meanwhile, the sister of a woman killed in the 1974 Birmingham pub bombings took part in a small demonstration outside Windsor Castle, calling for Mr McGuinness's arrest.
Julie Hambleton, whose 18-year-old sister Maxine died in the attack, said his attendance at the banquet was "the epitome of hypocrisy".
It was announced on Monday that no new inquiry would be launched into the bombings after a re-examination of evidence.
The IRA is believed by some to have carried out the attack but no-one has ever admitted responsibility.
For centuries Ireland was under British or English rule and the more recent Troubles can be traced back to the partition of the country.
Ireland won independence following a civil war, but six counties were kept under British control, creating Northern Ireland.
Gift for the Queen
President Higgins said before his visit that there were "a lot of very difficult memories" and that it would be wrong to "wipe the slate clean".
"How could I say to any family whose family member might be in a wheelchair or somebody who is dead, you must put it behind you?" he said.
Elsewhere Peter Hain - Northern Ireland secretary from 2005 to 2007 - suggested there should be no more prosecutions for offences committed before the 1998 Good Friday Agreement.
He said his proposal was not an "amnesty", but "perhaps some special judicial process" where people could come forward and admit crimes but not be sentenced.
Mr Higgins has been a stalwart of Irish public life, as a politician, poet and the subject of songs.
In an interview with the BBC's Fergal Keane on the eve of the visit, the president was asked if he would bring a gift for the Queen.
"Oh yes," he said. "Something equine, something cultural. The warmth around this visit has been tremendous."