Twenty-three years after leaving a refugee camp in Kenya, Ilhan Omar on Thursday became the first member of the US Congress to wear a hijab.

Rules were changed to allow Omar, a Muslim sworn in on the Qur’an, to wear a religious head covering on the floor of the House. There had been a 181-year ban on headwear of any type in the chamber.

“No one puts a scarf on my head but me,” she tweeted last November. “It’s my choice – one protected by the first amendment. And this is not the last ban I’m going to work to lift.”

Facebook Twitter Pinterest Ilhan Omar, a Democratic representative from Minnesota, with Nancy Pelosi. Photograph: Erik S Lesser/EPA

Omar, a Democrat, was part of a historically diverse freshman class in the 116th Congress sworn in amid cheers and jubilation. The House now has a record 102 women and a new generation of Muslims, Latinos, Native Americans and African Americans, more closely resembling the US population and set to take on Donald Trump in a new era of divided government. But on the Republican side, the House still consists mostly of white men.

Omar, 36, from Minnesota, tweeted: “As a kid, I acted as my grandfather’s translator at our caucuses and he was the one who first sparked my interest in politics. I wish he could be here to witness this historic moment, but he was here in spirit as I placed my hand on his Quran for the ceremonial swearing in.”

The normally staid chamber also bubbled with the sound of children. Congressman Eric Swalwell rocked his infant daughter, Cricket, on the House floor. Omar stopped by to take a turn holding the baby.

Facebook Twitter Pinterest Ilhan Omar embraces her son after she was sworn in by Nancy Pelosi. Photograph: Glen Stubbe/AP

She was one of the first two Muslim women elected to Congress. The other was Rashida Tlaib, who did not wear a hijab. Tlaib took the oath on a Qur’an.

Tlaib wore a traditional thobe stitched by her Palestinian-born mother.

When she stood to cast her vote for Nancy Pelosi as speaker, Tlaib’s sons, Adam, 13, and seven-year-old Yousif, were standing by her side.

Rashida Tlaib (@RashidaTlaib) This really happened. I am U.S. Congresswoman. Not bad for a girl from southwest Detroit who didn't speak English, daughter of Palestinian immigrants.

#13thDistrictStrong: You helped change Congress forever. Now, let's get to work to change our neighborhoods. #rootedincommunity pic.twitter.com/Xz511eIcyg

“Then Adam shouted Pelosi’s name, too, and both followed that with a ‘dab’ – a move favored by tweens in which the nose is nudged inside one elbow while the opposite hand is raised overhead,” the Associated Press reported. “Bella Kaufman saw it. Pelosi’s granddaughter, nine, jumped up from her seat in the second row and returned the salute. The House’s legions of parents of both parties chuckled.”

Play Video 1:17 Tears, hugs and dabbing as new Congress sworn in – video report

Pelosi was comfortably returned to the post of House speaker, making her once again the most powerful woman in American politics. The 78-year-old invited at least two dozen children to join her on the dais as she was sworn in, calling the House to order “on behalf of all of America’s children”.