SOUTH MIAMI, Fla. — So many Democrats wanted to run when a veteran Republican congresswoman announced her retirement here last year that Democratic Party leaders joked they could not keep track of all the would-be contenders. Then, in March, a ninth candidate joined the field: a woman who refers to herself as “Hurricane Donna.”

Donna Shalala, the health and human services secretary under President Bill Clinton and a former president of the University of Miami, had unmatched fund-raising prowess and deep name recognition, and she was thought to be a shoo-in in a district whose voters, despite sending a Republican to Congress since 1989, have steadily trended more Democratic.

Yet Ms. Shalala survived the primary in August by just four percentage points, and her Republican rival is proving far more formidable than Democrats anticipated, leaving a seat they fully expected to flip in peril.

“It shouldn’t even be this close,” said Mike Abrams, a former chairman of the Miami-Dade County Democratic Party. “I know from my Republican friends that they’re kind of bullish. It has me nervous because it would be a devastating loss. This is just not something that had been contemplated.”