Six months ago, it seemed improbable that Hillary Rodham Clinton would have to fight for the Democrats' presidential nomination.

But on the eve of the party's first candidates' debate in Las Vegas, she's battling Vermont Sen. Bernie Sanders for supporters on the left and looking over her shoulder at the possibility that Vice President Joe Biden might jump into the race.

Though the former first lady, New York senator and secretary of state is still the strong favorite to carry the party's nomination, it's not the cakewalk many expected. "She's forced to run for it now," said Lee Miringoff, Marist College pollster.

Clinton will face Sanders as well as ex-Maryland Gov. Martin O'Malley, ex-Rhode Island Sen. and Gov. Lincoln Chafee and ex-Sen. Jim Webb of Virginia in Tuesday's debate at the Wynn Las Vegas hotel-casino. It will get underway at 9 p.m. on CNN.

Sanders, an independent, has surprised some pundits in generating supporters -- and campaign contributions -- by honing a populist message that focuses on income inequality, the squeeze on the middle class and Wall Street fat cats.

Marist's most recent surveys show Clinton still comfortably ahead of Sanders in Iowa but trailing in New Hampshire -- sites of the first presidential caucus and primary, respectively. In July, Clinton led Sanders by 13 percentage points in New Hampshire. Now, she's down by 9.

"She got herself in a position where if she were to win the New Hampshire primary, that would look like an upset," Miringoff said. "Six months ago, the idea that Hillary wouldn't win would be unlikely. But Sanders has changed all that."

Further, Sanders has raised $26 million in donations since July -- mostly in small, online contributions -- underscoring the notion that he's building wider-than-expected support. Clinton, in contrast, barely outpaced him by raising $28 million over the same period.

Clinton recently has turned to what some call her "firewall" inside the Democratic base -- African-American and Latino voters. She recently launched a "Latinos for Hillary" campaign and will attend rallies in Las Vegas the day after the debate and in San Antonio on Thursday. Polls show Clinton favored overwhelmingly by nonwhite voters in the Democratic Party, with Sanders not attracting much support.

Clinton recently announced her opposition to the Keystone XL pipeline and the Trans-Pacific Partnership, a proposed trade pact, which could appeal to some liberals. She also unveiled a bank plan that favors tighter regulations -- but doesn't go as far as Sanders would.

At the debate, Clinton is unlikely to attack Sanders and risk alienating liberal Democrats, analysts said. She not only will have to deflect criticism but also remind Democrats that she's been carrying the party banner for many years.

"She's been out there fighting for decades and she has to present herself that way: 'I've got scar tissue because I've been out there fighting for our principles,' " said Larry Sabato, a University of Virginia political scientist and longtime observer of national elections.

"Right now, some are identifying Sanders more with Democratic principles than her," Sabato said. "She has to be that capital 'D' on the stage."

Sanders, analysts said, needs to continue to appeal to rank-and-file Democrats' consciences. "His message has to be about: Democrats need to vote for what they think is right and let the chips fall where they may," Miringoff said. "Build from this issues foundation that he has. Income inequality is a very popular . . . [issue] right now."

There is one area where Clinton can outflank Sanders on the left: gun control. Clinton unveiled a detailed gun plan last week in New Hampshire; in contrast, Sanders essentially said the matter should be left largely to states.

O'Malley, the former Baltimore mayor, has called on his rivals -- especially Sanders -- to support a series of tough-on-guns measures he's proposed, including reinstating the federal ban on assault-style weapons. He could look to further establish himself in the debate.

The backdrop of the debate is Biden. While the vice president remains publicly undecided about joining the race, several media outlets reported this week that his aides met with Democratic National Committee members to discuss filing deadlines to get on primary ballots and other issues.