Representative Donna E. Shalala, a Democrat who served as President Bill Clinton’s health secretary, narrowly lost her Florida seat to the Republican candidate, Maria Elvira Salazar, on Tuesday, becoming one of the more notable Democratic casualties in the House.
In a rematch of their 2018 House race, Ms. Salazar, a former television journalist, will represent Florida’s 27th Congressional District, which includes Miami and surrounding communities in Miami-Dade County.
The loss came as Democrats struggled with South Florida’s large Hispanic population, a group seen as pivotal to the fortunes of President Trump and former Vice President Joseph R. Biden Jr. in their quest for the state of Florida and its 29 Electoral College votes. Representative Debbie Mucarsel-Powell, a Democrat in a nearby district, was also defeated, and Mr. Biden was falling short of Hillary Clinton’s margins in Miami-Dade in 2016.
Ms. Salazar campaigned with Colombian politicians and reached out on Spanish-language media to the Cuban-American Republicans in Miami, conflating the Democratic platform with leftist oppression in their home countries. Ms. Shalala is not a socialist, but Ms. Salazar carried the thread even into her victory speech on Tuesday.
“I will not cower to the mob and when faced with the so-called democratic socialists,” she told supporters. “I will tell them that we have seen the dogma in action already and it doesn’t work.”
Two years ago, Ms. Shalala, 79, had defeated Ms. Salazar by six percentage points to fill the open seat of Representative Ileana Ros-Lehtinen, a Republican who had served in the House for 30 years.
Few first-term members of the House arrive on Capitol Hill with the kind of name recognition and credentials possessed by Ms. Shalala, whom Mr. Clinton nominated to be secretary of health and human services in 1993. From 2001 to 2015, Ms. Shalala served as the president of the University of Miami.
In April, Speaker Nancy Pelosi appointed Ms. Shalala to a commission overseeing the administration of a $2 trillion economic relief program in response to the pandemic. Ms. Shalala’s extensive stock holdings in companies affected by the pandemic quickly became the subject of scrutiny.
At the time, Ms. Shalala had said she had sold a number of the stocks in question since she had been elected to Congress, but then faced criticism for not disclosing more than 500 transactions as required by law. She paid a $1,200 fine to the House Ethics Committee in April, The Miami Herald reported. In September, Ms. Shalala was cited for failing to disclose two more stock sales.
Ms. Salazar accused Ms. Shalala of profiting off stock sales during the pandemic in an attack ad, without offering evidence to support her claim.
At her victory party, Ms. Salazar danced behind the lectern, thanking supporters for encouraging her to run again against Ms. Shalala.
“I felt your consistent and unwavering support during these 18 months,” Ms. Salazar said.
Shawn Hubler and Patricia Mazzei contributed reporting.