State and national Democratic leaders backing Hillary Clinton say that even though the race for the Democratic nomination is moving to states more favorable to her, the former secretary of state must sharpen her message to channel some of the populist fervor that has propelled Sen. Bernie Sanders.

Even as these Democrats remain committed to Clinton and express confidence that ultimately she will secure her party’s presidential nomination, many also say that Clinton’s near-loss in Iowa and drubbing in New Hampshire exposed weaknesses in her candidacy.

Two elected Democrats who support Clinton, Gov. Dannel Malloy of Connecticut and Gov. Jack Markell of Delaware, said that the power of Sanders’s ultra-liberal pitch for income equality clearly resonated in New Hampshire, where he embarrassed Clinton with a 22-point defeat. However, both said that they think Clinton will rebound as the campaign moves into friendlier territory.

“The scorched-earth framing around the rigged economy, making Wall Street pay for everything and calling for a political revolution, is something that is easy for people to respond to and I think they did [in New Hampshire],” Markell said. “The question is, as you get into some of these states, which demographically should be more attracted to Secretary Clinton, whether folks can get past the scorched-earth rhetoric and look at who can make real progress.”

The primary is now a contest pitting Sanders’s message and momentum against Clinton’s carefully built wall of support among state and national Democrats, unions and large interest groups who lined up behind her when she looked invincible.

As the unexpectedly close race moves into Southern and Midwestern states, where Clinton has maintained a substantial lead, many Democrats said they remain committed — at least until they see how she performs next. So far, she has suffered no public loss of support among the long list of elected and appointed officials she has racked up.

Some Sanders boosters predicted more elected Democrats would soon come on board after Sanders’s strong showing in the first two nominating states.

“No politician wants to support a campaign, no matter how noble and good, that isn’t viable. And as Bernie demonstrates some true viability, which he’s doing now, he’ll get more support. No doubt about it,” said Rep. Keith Ellison (D-Minn.), one of two Democrats in Congress to endorse Sanders.

Erin Bilbray, a Sanders backer and member of the Democratic National Committee from Nevada, said in a recent interview that for her it was “a deep struggle” to switch allegiances at the end of last year from Clinton, who would be the country’s first female president, to Sanders. But Bilbray said she was persuaded by the Vermont senator’s stance on money and politics, as well as his grass-roots strength.

Much of Clinton’s support owes to the view that she would be the more formidable Democratic nominee against a Republican in the fall — the more likely candidate to buck the postwar historical trend against consecutive presidencies of the same party.

“I had no illusion this would be easy,” said Sen. Timothy M. Kaine (D-Va.), who committed to Clinton, and urged her to run, a full year before she entered the race. “She is trying to do something that’s never been done, which is as a woman be president of the United States. She’s going to be the underdog until the last vote.”

Kaine suggested that Sanders’s political moment has already peaked. “Iowa and New Hampshire are two of the three best states for Bernie Sanders, the third being Vermont,” he said.

At the same time, some Democrats who have endorsed Clinton or are expected to do so are warning that she must demonstrate that she is in command of the nomination and mindful of a populist mood that appears to favor Sanders.

“If Hillary Clinton is going to be successful in the presidential race and be the nominee, she will have to earn more money with the grass roots and get more involvement in the grass roots, and I think she’s working in that direction,” said Colorado House Speaker Dickey Lee Hullinghorst, also an early Clinton supporter.

“When he first ran, I feel that he was going to be very good for the race on the Democratic side,” she said of Sanders. “But I thought that would be more short-lived than it is.”

Hullinghorst said she expects Sanders to remain a potential threat to Clinton past the Colorado primary on March 1. Clinton was scheduled to address a Colorado Democratic Party dinner Saturday, a sign that she considers the state to be competitive.

Others have greater concerns about the flaws Sanders’s success reveals in Clinton and the damage he may have already done to her as a general-election candidate, though no officials and Democratic power brokers already pledged to Clinton would speak on the record about their qualms.

“There’s a question of them allowing Sanders to gain momentum without drawing a contrast and then suddenly he got to where he was — the whole question of whether they were a little late to understanding what was going on,” said a senior Democrat close to the Clintons.

On Wednesday, the day after the New Hampshire loss, campaign chairman John Podesta and campaign manager Robby Mook spoke to Capitol Hill Democrats via conference call to reassure them on the path ahead. Podesta told the lawmakers he is confident in the strategy for March primaries and caucuses. Senior campaign staff have also made calls to reassure state-level Democrats.

Malloy said Clinton and her advisers need to quickly absorb the lessons from Iowa and New Hampshire, which he said turned out far worse than he had hoped. “The Clinton team’s got to get out there. She’s got to be the great candidate she can be, and the team’s got to do the work and execute.”

That sense that Clinton isn’t fully connecting, especially with key groups such as younger voters and women younger than 50, is behind much of the murmur of complaint and worry among the Democratic establishment that has long assumed to be locked in for her. In response, Clinton debuted a somewhat more optimistic, aspirational tone in her New Hampshire concession speech.

But Clinton needs to sharpen and boil down her pitch to voters, as then-Sen. Barack Obama did after losing to her in New Hampshire in 2008, said Jim Demers, who co-chaired Obama’s campaign then and signed on early for Clinton this time.

“Hope and change” didn’t really become the Obama mantra until after he lost there, recalled Demers, a longtime Democratic leader in the state.

“Two words — they fit on a placard. People don’t really want all the details. They want to know where you’re going to take the country.”

Malloy and Demers both said the calendar ahead should be more favorable for Clinton, due to demographics and the absence in some states of participation by independent voters.

“I think this race could look entirely different in a short period of time,” Malloy said.

Clinton’s campaign is banking on a near sweep of Southern states and other gains through mid-March — offset by a handful of expected Sanders victories — that would give her a near lock on the nomination because of the number of delegates awarded.

“I think everybody will have a better sense of this after March, when 56 or 57 percent of the delegates get decided,” Clinton chief pollster and adviser Joel Benenson said following the latest Democratic debate Thursday in Milwaukee. “I think that’s when we’ll know . . . whether someone has an insurmountable lead or not.”

Priorities USA Action, the main super PAC supporting Clinton, launched a major, $4.5 million infusion of spending on her behalf, upending plans to hold its fire until the general election. The move underscores how crucial several upcoming contests have become.

Gov. Peter Shumlin of Vermont, who also supports Clinton, said it was predictable that Democrats would have a competitive race for the nomination. “There has never been, in the history of the Democratic Party in my lifetime, a contest for an open presidential seat that’s not competitive,” he said. “I remain surprised that people are surprised that we are having a contest for the nomination.”

Shumlin said Clinton’s performance in Thursday’s debate in Wisconsin should calm nerves of Democrats who wondered about her skills as a candidate in the wake of the big loss in New Hampshire: “If anyone had any doubts and watched the debate last night, it’s hard to believe they would have any doubts this morning.”

Gov. John Hickenlooper of Colorado blamed some of the problems Clinton has encountered on the years of pounding by conservative opponents. “I did not think the attacks on her would be as successful with Democrats as they have been,” he said. “I think they’ve done what damage they’re going to do.”

Hickenlooper described her as one of the best prepared people ever to run for office. “She’s a workhorse, not a show horse,” he said.

Hickenlooper cautioned against any major changes in her campaign. “I don’t think she has to retool and I don’t think she has to hang on,” he said. “She has other choices.”

Hickenlooper expressed confidence that, however challenging Sanders’s opposition might look today, the campaign will turn decisively in Clinton’s direction as other states come into play. “I don’t think it’s going to go all the way to the floor of the convention,” he said.

Ken Martin, chairman of the Minnesota Democratic-Farmer Labor Party, also endorsed Clinton early. He said the conventional wisdom is that the state’s penchant for progressive, outside candidates and its caucus-style nominating contest make it fertile ground for Sanders.

Clinton addressed Minnesota Democrats at a party dinner Friday.

Whether the primary goes as far as the Democratic convention this summer will depend on how Sanders performs in Nevada, which votes Feb. 20, and South Carolina a week later, Martin said.

“The real test would be in Nevada and South Carolina. If he’s able to do that then, I think people should start viewing him differently,” Martin said. “If he gets the nomination of our party, he clearly did something right; it says something about your ability to put together an organization.”

Clinton’s campaign is already lowering expectations for her in Nevada, despite her advantage with the state’s large percentage of Latino voters.

Even if she loses there, though, many senior Democrats supporting her or remaining neutral agreed that she is likely to prevail.

“All of this stuff is going to be a distant memory by the time we get to April,” said Texas Democratic Party chairman Gilberto Hinojosa. “So it’ll hurt for a little while, but she has an enormous ability to rebound and reestablish her position as a leader. I’m not very concerned that that’s going to be a big problem.”

Dan Balz, Philip Rucker and John Wagner contributed to this report