Democratic presidential candidate Martin O'Malley, speaking at an appearance in Iowa, called for "many debates" before the Iowa caucuses. (Martin O'Malley)

As Democratic presidential long shot Martin O’Malley slogs through Iowa, he has pointed words for the rivals overshadowing him.

Sen. Bernie Sanders (I-Vt.) is a “protest candidate,” he says, whose anger may not resonate so much with voters when it’s time to actually pick a president. And he says Hillary Rodham Clinton, “this year’s inevitable front-runner,” might “only be inevitable right up until the first contest.”

Lagging in the polls and struggling to raise money, the former Maryland governor insists he doesn’t regret waiting until late spring to launch his candidacy — after Sanders’s crowds had started to swell and Clinton had survived initial criticism over her private e-mail account and her family’s foundation.

“If I had gotten in in January, if I had gotten in the day after I got out of being governor, I still wouldn’t be a socialist,” O’Malley said, referring to Sanders. “I wouldn’t be calling for a political revolution. And he’s able to do that, which makes him more attractive to some who believe the establishment isn’t listening and a message needs to be sent right now.”

While Clinton and Sanders draw headlines, O’Malley is quietly courting voters here in the country’s first caucus state, going “town to town to town, the old-fashioned way.”

His campaign — which raised $2 million last quarter, compared with Clinton’s $47 million and Sanders’s $15 million — is focusing much of its limited resources on Iowa, hoping a strong showing will catapult O’Malley forward. He visited the State Fair in Des Moines on Thursday and has three stops planned Friday, including one in Clear Lake with the rest of the Democratic field.

“It’s frustrating for people that are helping to put gas in my tank and raise the money, because it’s like planting seeds in a field and you don’t see them come up for a while,” O’Malley said in an interview. “But that’s the nature of this. . . . We’re doing what we need to do in order to emerge here as the alternative.”

The Sanders factor

O’Malley’s path to the nomination has been uphill from the outset. It has grown steeper since the unexpected success of Sanders, who has emerged as the leading liberal alternative to Clinton — ground O’Malley had sought.

An average of recent Iowa polls by RealClearPolitics shows Clinton with 51 percent support, Sanders at 26 percent and O’Malley at 4 percent.

O’Malley notes that past Democratic nominees, including John F. Kerry and Barack Obama, were not leading in the polls six months before the voting began — although neither Kerry nor Obama was lagging as far behind as O’Malley. And he points out that Gary Hart, for whom O’Malley worked in 1984, finished second in Iowa that year after toiling for months in the single digits.

O’Malley, who is taking far more questions on the trail from activists and reporters than Clinton or Sanders is, said he believes letting the voters take the “full measure” of him would serve him well.

Taking a shot a Clinton, he said Iowa voters had done that with her eight years ago, when she finished third “and only 29 percent of the people decided to be for her.”

In essence, the O’Malley campaign is banking on both Clinton and Sanders to falter between now and February. It’s unclear how likely either scenario is.

Ed O’Leary, a retired letter carrier who was among about 60 people who turned out recently to see O’Malley in a Fort Dodge coffee shop, said he liked the former governor’s progressive vision and was leaning in his direction.

But O’Leary, 79, said many of his friends are for Sanders. “I can see them sticking with him all the way to the caucuses,” he said.

Asked by an O’Malley aide to sign a card committing him to caucus for the Maryland Democrat, O’Leary declined, saying, “We have a long way to go.”

James Sutton, 78, who traveled for about 30 minutes to see O’Malley at a library event in the small town of Grundy Center, said he is wrestling with whether to support him or Clinton.

“They’re such different people, in my mind, but I like them both,” said Sutton, a semi-retired tool and die machinist. Asked about Sanders, he said, “The word ‘socialist’ bothers me just a little bit.”

Larry Hodgden, chairman of the Cedar County Democrats, is among those who argue that O’Malley should have gotten into the race sooner.

“I told him as soon as Hillary and Sanders got in, they’d suck up all the oxygen,” said Hodgden, who has not committed to a candidate but said he considers O’Malley “the kind of person we need to lead the country.”

The Iowa playbook

Because of Iowa’s caucus process, candidates tend to perform better there if they can build strong organizations across the state that allow staffers and volunteers to stay in touch with likely voters. While several party chairmen credited O’Malley for making headway in that area, his relative lack of money remains an issue.

He plans to open his third office in Iowa on Saturday; Clinton and Sanders have close to a dozen.

Dennis Goldford, a political scientist at Drake University, said O’Malley’s challenge is partly ideological. Voters see Sanders as the most authentic progressive candidate, and they see Clinton as someone who is more compromised but can win.

“If Sanders is the purist and Clinton is the pragmatist, where’s O’Malley’s niche?” Goldford asked.

There is a lot of overlap between O’Malley’s policy prescriptions and those of Sanders. Both pledge to help working- and ­middle-class families, more aggressively police Wall Street, break up the big banks and fight climate change.

O’Malley has been playing up his experience as a governor and as mayor of Baltimore. During his time as governor, Maryland raised the minimum wage, repealed the death penalty and legalized same-sex marriage.

“I am the only candidate in this race who can stand before you with 15 years of executive experience, not merely making progressive promises but actually achieving progressive results, actually getting things done,” he told his audience in Fort Dodge.

O’Malley’s aides are eager for debates to begin, arguing that he tends to fare well when he and his rivals share the same stage, including at a recent Iowa Democratic Party dinner in Cedar Rapids. As of now, the first of six debates sanctioned by the Democratic National Committee is not until October — a plan O’Malley has criticized as unfair.

George Appleby, a Des Moines lawyer who is chairing O’Malley’s campaign in Iowa, said the candidate “has a lot of spadework to do that won’t show up in poll numbers for a while.” But he added: “I can see the scenario where he wins this. There’s Clinton fatigue, and Bernie is going to flame out.”

For now, O’Malley is making light of his relatively low standing.

“One of the truths of the Iowa caucuses is that the inevitable front-runner is inevitable, but only until right up until the first contest,” he told about three dozen people who came to see him in Grundy Center. “And the other truth is that whoever’s surging in July is not the candidate surging in January.

“So you’ll be glad to know we are not surging too early.”

Correction: An earlier version of this article said that Hillary Clinton finished second in the Iowa Democratic caucuses in 2008. She was third. This version has been corrrected.