One minute the refugee girls were watching a documentary about Nobel Peace Prize Winner Malala Yousafzai on a television screen Tuesday afternoon in Minneapolis.

The next moment, they were sitting face to face with Yousafzai herself.

The 19-year-old Pakistani activist who survived an assassination attempt by the Taliban for speaking up for girls’ education rights made a surprise visit at a lunch with 20 star-struck girls, followed by an evening inspiring a much larger crowd.

About 5,000 people — many of them girls — packed Target Center to hear Yousafzai tell her life story and encourage them to believe in themselves and use their voices to change the world.

“Sometimes we feel like I’m just one girl. But look at this place here, how many people are here. The change we can bring, it’s amazing,” she told the crowd. “Always believe in yourself, whatever mission you have in life. Don’t put limits on your life.”

Her Minneapolis visit was one stop along a multi-city speaking tour that included Seattle, Portland, and Providence, R.I.

Gallery: A visit from Malala Yousafza Gallery: A visit from Malala Yousafza

In her speech at Target Center, she praised the state for welcoming immigrants and refugees. “It looked that Minnesota is nice and I’m really grateful to all of you for your welcoming heart,” she said.

She added that she was particularly moved by the girls she met at lunch.

“They inspired me because they have courage. Some have been to more than six countries. It’s a really hard time in your life when you don’t know who will welcome you, who will accept you,” she said. “They had courage to stand up during this hard situation. And secondly, they believe education can help them to move forward in their life.”

The girls were recent refugees, primarily from Somalia, who attended Newcomer Academy at Wellstone International High School in Minneapolis. Their meeting at the Afro Deli and African Development Center was requested by Yousafzai and arranged by the Confederation of Somali Community in Minnesota.

“She is energized by conversations with girls,” said Eason Jordan, director of special projects for the Malala Fund, which supports more resources for education and safe schools for all children.

Accompanied by her father, Ziauddin Yousafzai, Malala entered the room drawing gasps and stares as she sat down with the girls. She asked them about their aspirations, nodding as the girls introduced themselves and spoke of their dreams of becoming teachers, doctors, and lawyers. She encouraged them to speak for themselves and join hands with others who are working for the same causes to make their voices even louder.

“I am with you and I stand by you,” Yousafzai told them.

Afterward, the girls surrounded her, taking selfies and receiving copies of her memoir.

“It’s amazing! I didn’t think I would see her today,” said Zaynab Abdi, clutching her copy of Yousafzai’s book.

The Star Tribune sponsored the Target Center event, called “An Evening With Malala Yousafzai.” It was part of the national Unique Lives and Experiences lecture series featuring prominent female voices.

Born in the Swat Valley of northern Pakistan, Yousafzai grew up with a love of learning. Her father, an outspoken advocate for education, ran a learning institution in town.

In October 2012, when she was 15, Yousafzai was riding a bus home from school with her friends when she was attacked and shot in the head by a Taliban fighter. She was taken to Birmingham, England, to receive treatment at the Queen Elizabeth Hospital.

She underwent multiple surgeries, including repair of a facial nerve to fix the paralyzed left side of her face, according to her biography on the Nobel Peace Prize website. Eventually she recovered and was able to attend school in England.

She lives with her family in Birmingham and is a global activist advocating for children’s rights to go to school and receive education — with a particular focus on girls’ education rights.

Yousafzai was awarded the Nobel Peace Prize in 2014 at the age of 17 — making her the youngest recipient of the prestigious prize. (She shared the prize that year with Indian child rights activist Kailash Satyarthi.)

For her young Minneapolis audiences, Yousafzai advised them not to lose hope that they can achieve their dreams. “You have to work hard. It’s not something you can change in one day. This is my whole life campaign. This is my dream and I will keep on working hard for it.”

Malala Yousafzai, right, met with young refugees on Tuesday.

Twitter: @alliesh