US congresswoman Ilhan Omar had just won her primary in Minnesota last year, putting her on track to make history, when she found herself in a meeting with Nancy Pelosi.

Pelosi, then the House minority leader, pointed out that Omar had a smooth path to victory in the reliably Democratic district. She then asked Omar to name the one thing that worried her, to which the Somali refugee turned politician responded: her headscarf.

Omar recounted her exchange with Pelosi at the first ever congressional Iftar on Monday before roughly 100 Muslim Americans who had gathered for the event – a moment of history for Congress.

Omar was joined by the two other Muslim members of Congress – representatives Rashida Tlaib and André Carson – who all shared some of the challenges they faced on the basis of their identity as part of an institution still struggling with diversity.

Omar’s anecdote about meeting Pelosi alluded to the challenges she might face as one the first Muslim women to take the oath of office inside the US Capitol.

“Ignorance is very pervasive in this country,” Omar recalled telling Pelosi. “I am worried that when I show up in November, as the victor of [this] election, that they will do everything to make sure that I will not be able to wear my headscarf to represent my constituents.”

Muslims around the world are currently observing the holy month with prayers, fasting from dawn to sunset and nightly feasts. Photograph: Alex Wong/Getty Images

Pelosi reassured Omar that her headscarf wold be “the one thing you will never have to worry about”, and followed up on her promise by supporting a rules change, enacted in January, that allowed head coverings on the House floor for the first time in 181 years.

The congressional Iftar marked a rare opportunity for the handful of Muslim members in Congress to open up about their faith and break fast in the holy month of Ramadan with their colleagues on Capitol Hill at a time when they are routinely vilified on the right.

Since their arrival to the nation’s capital in January, Omar and Tlaib have been the subject of intense attacks from Donald Trump and Republicans over their criticism of US policy toward Israel.

“It doesn’t matter what you do or what you say – if you’re a Muslim, it’s going to get exaggerated,” Carson told the crowd.

The crowd assembled at the Iftar comprised Muslim congressional staffers, government officials and other community members. Speakers included the House majority leader, Steny Hoyer, Senate minority whip, Dick Durbin, and representative Alexandria Ocasio-Cortez, the progressive star and close friend of Omar’s and Tlaib’s.

Ocasio-Cortez condemned the targeting of Omar and Tlaib, stating: “We know these divisions are a distraction, and they are rooted in the subjugation of all the communities involved that are being pitted against one another.”

Despite the occasional political undertones, the gathering was largely a celebration of spirituality and interfaith dialogue.

As the clock struck 8.17 pm, marking the time of sunset, an imam offered a brief prayer as dates were handed out to break their fast.

“Ramadan is a time for not only spiritual renewal, but a time to open doors to friends, neighbors and anyone who wants to commune and reflect,” said Farhana Khera, the executive director of Muslim Advocates, the civil rights organization that hosted the Iftar.

“This evening, at a time of unprecedented levels of anti-Muslim bigotry and hate crimes, together we showed that we will not be intimidated or cowed by those who wish to demonize and marginalize American Muslims. We will express our faith, our dignity and our commitment to caring for each other and our nation.”

One name that was left unmentioned was Donald Trump, who was only sparingly invoked by lawmakers when speaking to some of the anti-Muslim bias emanating from the highest levels of government. Trump hosted his own Iftar at the White House that excluded members of the Muslim American community and was attended by diplomats who the White House refused to publicly identify.

Omar cited one of the president’s most infamous broadsides against Muslims after the Gold Star father Khizr Khan’s breakout speech at the 2016 Democratic national convention. As Khan stood before her in the crowd, Omar recalled how Trump suggested that Khan’s wife had perhaps not spoken because she was “not allowed”.

“Little did they know they were going to get the two loudest Muslim women in the country in Congress with the biggest mic,” she said, prompting cheers and applause.

“They are mortified about the fact that they awakened these Muslim women to fight for their space in Congress.”