Malala Yousafzai called on Canada to play a leadership role in promoting education for girls and refugees around the world Wednesday after becoming an honorary Canadian citizen.

In a historic address to Parliament, the Nobel Peace Prize recipient and human rights activist heaped praise on Canada for its commitment to helping refugees, advancing women's rights and working for world peace.

She urged Canada to use its influence on the world stage and its G7 presidency to push for more education funding for girls and child refugees internationally.

"If Canada leads, the world will follow," she said to repeated roaring applause and standing ovations in a packed House of Commons.

Yousafzai condemned acts of terror perpetrated in the name of Islam, including the Parliament Hill shooting that prevented her from receiving her honorary citizenship as scheduled in October 2014. She said as soon as an attacker commits violence in the name of her religion, "you are not a Muslim any more."

She commended Canada for opening its door to refugees as other countries such as the U.S. seals its border.

"Your motto and your stand, welcome to Canada, is more than a headline or a hashtag," she said. "It is the spirit of humanity that every single one of us would yearn for if our family was in crisis. I pray that you continue to open your homes, your hearts, to the world's most defenceless children and families and I hope your neighbours will follow your example."

Malala Yousafzai talks about her first attempt to come to Ottawa, denounces terrorism 2:44

Her solemn words were peppered with humour, as she recalled peers who were gushing over her opportunity to meet the young Canadian prime minister who sports tattoos and practices yoga.

But she encouraged young people not to wait before becoming active for a good cause.

"I used to think I had to wait to be an adult to lead. But I've learned that even a child's voice can be heard around the world," she said.

Malala Yousafzai addressed Parliament and was made an honorary Canadian citizen 3:25

Her father, Ziauddin Yousafzai, and mother, Toor Pekai Yousafzai, were among the hundreds of politicians, dignitaries and students in the chamber. They were choked with emotion as they rose from their seats, hands to their hearts, when acknowledged by House Speaker Geoff Regan.

Youngest to address Parliament

Yousafzai makes history as the youngest person ever to address Parliament, and she becomes just the sixth person to receive honorary Canadian citizenship.

She accepted a certificate and Canadian flag from the Peace Tower from Prime Minister Justin Trudeau during a short ceremony inside the Library of Parliament.

Nobel Peace Prize winner Malala Yousafzai addresses the House of Commons. (Adrian Wyld/Canadian Press)

Yousafzai was targeted by Taliban at age 15 for speaking out on the right for girls to learn and attend school.

She survived the attack by a masked gunman to become an iconic international activist. After moving with her family to Birmingham, England, she founded the non-profit Malala Fund and co-authored the best-selling book I am Malala.

Named a co-recipient of the 2014 Nobel Peace Prize, Yousafzai was the youngest person ever to earn the distinction. She was recently appointed as a UN Messenger of Peace by United Nations Sec.-Gen. Antonio Guterres, the highest honour given by the world body.

'Model of kindness'

In his remarks welcoming Yousafzai to Parliament, Trudeau called her a "trailblazer" and a "model of kindness" who is also "impossibly humble."

As a father and former teacher, Trudeau said he understands that education is the key to solving the world's challenges, including ending poverty, fighting climate change and preventing wars.

"We know that only through education can we achieve real peace," he said.

Yousafzai urged young Canadians, women to get involve in politics and makes a few jokes about meeting Prime Minister Justin Trudeau 2:39

Yousafzai began her busy day in Ottawa by making a surprise visit to Ottawa's Ridgemont High School, where she delivered a strong message to the diverse student population, calling for a collective fight for change.

She recounted the story of how when she was born, community members came not to congratulate her mother, but to tell her, "Don't worry, next time you'll have a son."

Yousafzai was fortunate to have parents who challenged traditional norms, and recalled how her father added her name to the 300-year-old family tree — the first female name ever written on it.

Nobel Prize winner Malala Yousafzai talks about her last visit to Ottawa, the importance of education for girls, activism and the role of men in the fight for equal rights 2:19

"We have to challenge society, we have to challenge communities, we have to raise our voice," she told the students.

'Keep on fighting'

"And it's true that they won't listen to us, but if we keep on fighting, they will change. The same cousin who was laughing when my father wrote my name on the family tree, he now praises me, stands with me, and he now believes in education. So things will change.… We need to have passion to go forward and take the steps."

She said fathers and men in positions of power must play a critical role in empowering women through education and employment.

"These issues for women are global, they are not limited to any country, any society. So men have to play a role in this and that's men should come out and call themselves feminists. If my father had not allowed me to speak out, I would not have been allowed to come here and speak here and be who I am today."

Yousafzai is presented with an honorary Canadian citizenship by Prime Minister Justin Trudeau. (Adrian Wyld/Canadian Press)

'Hopeful and positive'

But she also flagged significant achievements for women over the years, including the right to vote, and urged young people to remain "hopeful and positive."

After her address to Parliament, Yousafzai sat down with Trudeau to discuss issues related to girls' education and empowering women and communities. She is also meeting with interim Conservative Leader Rona Ambrose in Ottawa.

Trudeau's wife, Sophie Grégoire Trudeau, attended this morning's event and called Yousafzai's courage, grace and strength "contagious."

"When one person takes a small step forward, everyone takes a step forward," she said.