WASHINGTON — When President Trump tweeted an edited video portraying Representative Ilhan Omar as playing down the 9/11 attacks, it took less than three hours for Senator Bernie Sanders to rush to her defense and declare her “a leader with strength and courage.” But when a Fox News anchor described Mr. Sanders on Monday night as “a staunch supporter” of Ms. Omar, the senator balked.

“Hold it, hold it, hold it,” Mr. Sanders insisted. “I’ve talked to Ilhan about twice in my life.”

His reaction reflects the broader Democratic Party’s conflicted embrace of Ms. Omar. That struggle has especially been apparent in the House, where Jewish Democrats have tangled with Ms. Omar and Democratic leaders have grappled with how to handle the freshman Democrat from Minnesota, who is one of the first two Muslim women elected to Congress.

When Ms. Omar, 36, pushed for a House rules change to permit her to wear her hijab on the House floor, she was heralded as a powerful symbol of the Democratic Party’s inclusiveness. But her support of the boycott Israel movement and her attacks on supporters of Israel have made her a complicated figure to defend. Democratic leaders, as well as many in the rank and file, are choosing their words with caution.

Speaker Nancy Pelosi denounced the president for invoking the “painful images of 9/11 for a political attack” without mentioning Ms. Omar, and waited until Sunday — two days after Mr. Trump’s tweet — to issue a statement saying she had asked the Capitol Police to assess the congresswoman’s safety. Representative Steny H. Hoyer, the House Democratic leader, waited three days before calling on the president to apologize to Ms. Omar.