For most teenage girls, the chance to meet the Queen and miss a day of school would be a double win. But for Malala Yousafzai, missing a day of lessons to go to Buckingham Palace was a tough decision, the Pakistani teen said.
The 16-year-old was shot in the head in Pakistan last October after campaigning for the right of girls to go to school without fear, in a part of the country where Islamic fundamentalists were trying to impose a strict form of Sharia law.
Malala was one of the guests at a reception for commonwealth, youth and education hosted by the Queen and the Duke of Edinburgh.
She was reduced to laughter by a comment from the Duke, who quipped that in this country, people want children to go to school to get them out of the house. Malala covered her face while in a fit of giggles at his joke.
The teenager, accompanied by her father Ziauddin, gave the Queen a copy of her book, I Am Malala, during their meeting in the palace's White Drawing Room, telling her: "It is a great honour for me to be here, and I wanted to present you with this book."
Accepting the gift, the Queen replied: "That's very kind of you."
Malala told the Queen she was passionate about every child having a right to an education, everywhere around the world.
She added: "Especially in this country as well.
"I have heard about many children that can't go to school, and I want to continue our work."
Yousafzai also spoke to the Queen and Duke about their past visits to his home country.
Malala was flown from Pakistan to the UK for emergency treatment after the attack. Surgeons who treated her said she came within inches of death when the bullet grazed her brain in the attack on a school bus.
She was treated at Queen Elizabeth Hospital in Birmingham and has now settled in the city with her family. Since the attack, she has addressed the United Nations and been nominated for the Nobel Peace Prize.
Princess Beatrice and the Duke and Duchess of Gloucester were also present at today's reception, attended by 350 guests from academic institutions around the world.
It included a performance from the Commonwealth Youth Orchestra and choir.
Malala said that she would not ordinarily miss a day of lessons - but made an exception.
"I had to miss school because I was meeting the Queen," she said. "It's such an honour for me to be here at Buckingham Palace. It's really an honour to meet the Queen.
"I also wanted to raise the issue of girls not being educated on a higher platform so that the government in each country takes action on it.
"We need to fight for education in the suffering countries and developing countries, but also here."
She said she particularly enjoyed reminiscing about her home district with the Queen.
"The most interesting thing was that when I met the Queen, I said, 'When you were in your 20s you came to Swat and came to the White Palace, where I'm from'.
"It is a beautiful valley. It is like paradise on earth."
The teenager admitted she had been unsure of the etiquette surrounding being introduced to the Queen before heading to London from her Birmingham home.
"I was really confused before meeting her, because some people said you have to curtsey, and some people said you should not talk until she talks," she said. "Then when I met her, it was quite good and she was really nice. She talked to me in a very friendly kind of way."
Malala said she was hopeful the Queen, and the UK Government, would help her campaign for education.
Asked about the Duke's joke, she said: "He said parents are tired of children, and that's why they send them to school, and I laughed."
Princess Beatrice, wearing a dark red Cos dress, dark red and navy Asos jacket and black Kurt Geiger heels, shook Malala's hand and told her: "It's so wonderful to meet you. What you've achieved is just so incredible.
"It's an incredible thing to have your campaign. I'm very honoured to be meeting you."
She added that her mother, Sarah, Duchess of York, would like to meet Malala, adding: "She has been completely moved by your strength and what you've achieved."
The Queen, wearing a duck-egg blue Angela Kelly outfit, had been presented to a small number of Commonwealth representatives, including the Yousafzais, before returning to speak further to Malala and her father.
Other guests at the reception said it was a privilege to meet Malala.
Yaseen Ebrahim, from Hounslow, west London, who has dual South African and Tanzanian heritage, said: "Nelson Mandela said that education is the most important thing that people can have.
"The best example is Malala, and how she treasures education."
The 18-year-old said it was "an honour" to meet Malala and to have the chance to discuss education with her.
He added: "Pupils in South Africa appreciate education more than here, and yet it is so readily available here, you take it for granted."
Malala agreed, saying: "Nothing is important until you're deprived of it.
"I was living in Swat and I couldn't go to school because of terrorists."
She also referred to those in India who could not attend classes because of child labour, adding: "There are many hurdles in our way to get education.
"Here in the UK it's easy for most children to go to school. They don't realise it, but they're not just going to school, they're also building up their future."
She urged young people to "respect" their right to education and give it the importance it deserves, as well as standing up for those who do not have the same opportunities.
"We must not be silent," she said. "We must raise our voice."
She was also introduced to children from the choir of St Winefride's School in Manor Park, who had sung for the guests.