The Queen has said she is rededicating herself to the service of the UK and its people as she celebrates her Diamond Jubilee.
In a speech to both Houses of Parliament, she said the commemoration of her 60 years on the throne was a chance "to come together in a spirit of neighbourliness and celebration".
The Queen also praised Prince Philip for his "constant strength".
A stained glassed window commissioned for the Jubilee was unveiled.
Hundreds of dignitaries, including Prime Minister David Cameron, his deputy Nick Clegg, Labour leader Ed Miliband and Archbishop of Canterbury Dr Rowan Williams, assembled for the speech, which was greeted with a standing ovation.
The Queen responded to tributes made to her in both Houses of Parliament earlier this month.
'Ingenuity and tolerance' These "humble addresses" were officially presented to her by Commons Speaker John Bercow and Lords Speaker Baroness D'Souza.
Speaking in Westminster Hall, the Queen paid tribute to the British virtues of "resilience, ingenuity and tolerance", and to the Duke of Edinburgh, whom she called her "constant strength and guide" over the decades.
Continue reading the main story
Analysis Peter Hunt Royal correspondent This was a confident Queen who didn't court controversy.
She tried a few gags. Once they had warmed up, her audience - which included political foes forced to sit next to each other and exchange pleasantries - laughed on cue.
She paid a public tribute to the man who, privately, plays such a pivotal role in her life.
Prince Philip listened in silence - very much his role when on display these past sixty years.
Her talk of rededicating herself to the service of "our great country" will come as no great surprise - abdication is still a taboo word for the Windsors.
But it will have pained the small number of protesters seeking an elected head of state who gathered outside Westminster Hall.
Their pain will only increase in the coming months as the Diamond Jubilee is celebrated in the sixteen countries where Elizabeth is still Queen.
Read more from Peter Full text: Queen's Jubilee address Nick Robinson: Well, she resisted In pictures: Queen's address She said: "During these years as your Queen, the support of my family has, across the generations, been beyond measure.
"Prince Philip is, I believe, well-known for declining compliments of any kind. But throughout he has been a constant strength and guide."
Reflecting on the ancient setting for her address: "We are reminded here of our past, of the continuity of our national story and the virtues of resilience, ingenuity and tolerance which created it.
"I have been privileged to witness some of that history and, with the support of my family, rededicate myself to the service of our great country and its people now and in the years to come."
The Queen also looked back at the only other monarch to celebrate a Diamond Jubilee, Queen Victoria, in 1897.
She said: "So, in an era when the regular, worthy rhythm of life is less eye-catching than doing something extraordinary, I am reassured that I am merely the second sovereign to celebrate a Diamond Jubilee."
Ahead of the speech, House of Commons Speaker John Bercow praised the Queen for presiding over an increase in diversity in public life during her reign, describing her as a "kaleidoscope Queen of a kaleidoscope country in a kaleidoscope Commonwealth".
'Close affinity' The tradition of both houses of Parliament making addresses to the monarch and the sovereign replying dates back to the 16th Century.
Such events have been staged in Westminster Hall since George V's Silver Jubilee in 1935.
To mark the occasion, the Queen was presented with the specially commissioned stained glass window as a gift by members of both Houses of Parliament.
Past prime ministers were in Westminster Hall for the Queen's address Consisting of up 1,500 pieces of glass, it has been paid for personally by members of both Houses and designed by British artist John Reyntiens.
In her speech, the Queen praised the "remarkable sacrifice and courage of our armed forces", adding: "Much may have indeed have changed these past 60 years but the valour of those who risk their lives for the defence and freedom of us all remains undimmed."
Members of the Royal Family have begun touring the Commonwealth to mark the Diamond Jubilee, with Prince Harry recently returning from a trip to Belize, the Bahamas and Jamaica.
The Queen said: "These overseas tours are a reminder of our close affinity with the Commonwealth, encompassing about one-third of the world's population.
"My own association with the Commonwealth has taught me that the most important contact between nations is usually contact between its peoples.
"An organisation dedicated to certain values, the Commonwealth has flourished and grown by successfully promoting and protecting that contact."
Monarchy debate A small number of anti-monarchy protesters gathered outside Parliament during the Queen's speech.
Supporters of the campaign group Republic, which wants a "democratic alternative" to the monarchy, said there needed to be a debate about whether a hereditary institution was appropriate for the country in the 21st Century.
"The role of head of state is too important simply to be chosen by an accident of birth," Labour MP Katy Clark told Radio 4's World at One.
"It should not be a hereditary position that people are entitled to. We should have a say over who it is."
Few people are accorded the honour of addressing both Houses of Parliament in Westminster Hall. Among those to have done so in recent times include US President Barack Obama and Pope Benedict XVI.
The Queen addressed Parliament in 1977 and 2002 when she marked her Silver and Golden Jubilees respectively.
The Queen began her Diamond Jubilee tour of the UK in Leicester earlier this month. Celebrations will come to a head in June during a four-day series of events.