IE 11 is not supported. For an optimal experience visit our site on another browser.

DEVELOPING: Source tells NBC News that Israel has carried out an operation inside Iran

Martin O'Malley's first challenge: Bernie Sanders

O'Malley was supposed to be the leading alternative to Hillary Clinton, but with Sanders drawing huge crowds, O'Malley's place is less clear.

Martin O’Malley was supposed to be the main liberal alternative to Hillary Clinton. But when he announced his candidacy Saturday in Baltimore, he found that spot already taken by someone else.

Vermont Sen. Bernie Sanders, who is now Clinton’s top rival in early polls, beat the former Maryland governor to a presidential announcement by exactly a month, and to a outdoor kickoff rally by five days.

Both men served two terms as mayor in the largest city in their states. Both were then elected statewide. And both returned to those cities this week to announce their underdog presidential campaigns. But the scenes were very different.

Related: Martin O'Malley's problem with running against Hillary and Bernie

O’Malley had several hundred, perhaps a thousand, supporters to cheer him on Saturday at a park overlooking Baltimore’s skyline. There were also about a dozen protesters, who heckled O’Malley over his policing policies as mayor.

Sanders, on the other hand, drew more than 5,000 supporters in Burlington, a city of 40,000. A sea of fans overflowed the lakefront park Sanders helped build as mayor, and packed in behind portapotties and platforms, where they had no hope of a view.

And it was not just the kickoffs. Both candidates this week visited Iowa where Sanders drew 700 in Davenport for the biggest rally any candidate of either party has seen in the state this election season, according to the New York Times. In a tiny town of Kensett, population 240, Sanders drew 300.

O’Malley visited Davenport three days later and spoke to 50 supporters. He met another 200 in Des Moines later that night, according to the Des Moines Register.

Meanwhile, Sanders headed to Minneapolis, Minnesota, where he fired up an overflow crowd of more than 3,000 in a basketball gym, according to the Minneapolis Star Tribune. Hundreds more listed from outside, unable to get in.

On the Internet, 84,000 Facebook users generated 120,000 interactions about O’Malley in the 24 hours after his launch, according to the social networking company. In the same period after Sanders’ announcement, Facebook record 10 times the interactions -- 1.2 million -- from 592,000 different users. (Hillary Clinton blew both of them out of the water with 10.1 million interactions from almost 5 million users.)

Craig Varoga, who served as O’Malley’s chief strategist on his 2010 reelection campaign, but is not involved with the candidate today, said O’Malley needs to find a way to deal with Sanders soon.

“His first real challenge is dealing with Bernie Sanders’ campaign, rather than directly going after Hillary Clinton,” said Varoga.

Only perhaps 30-40% of Democrats are currently not supporting Clinton. If O’Malley and Sanders split that bloc, neither will be seen as credible, Varoga said.

“They have to find a way to talk about Sanders without talking about him. The worst thing is for one longshot to get in a fight with another longshot,” Varoga said.

O’Malley’s camp, however, insists they’re not concerned about Sanders -- in fact they welcome his success.

As they see it, O’Malley’s more immediate challenge is breaking through the psychological barrier of Hillary Clinton’s inevitability. No candidate will be taken seriously until the idea that Clinton can lose is taken seriously. So the more any progressive alternative to Clinton rises in the polls, the better for everyone running to her left.

“I think it's an encouragement to my candidacy,” O’Malley said of Sanders on ABC’s “This Week” Sunday. Why should progressive support O’Malley over Sanders? “Because I have a track record of actually getting things done, not just talking about things,” O’Malley added.

Related: Comparing Hillary Clinton vs. Bernie Sanders on the issues

The former governor’s allies view Sanders as essentially a protest candidate, while O’Malley is presidential. If they can convince voters there’s a chance for an alternative to actually win against Clinton, they think Sanders’ supporters will flock to the more electable O’Malley.

Team O’Malley looks to the 2012 Republican presidential primary, in which nearly every candidate had a moment in the sun, and sees Sanders’ fling with Democratic primary voters as fleeting.

And O’Malley’s allies are pointing to another historical parallel as well. “Bernie Sanders is in some ways like Sen. McCarthy was in 1968,” said former Maryland governor Parris Glendening, who is supporting O’Malley.

The 1968 Democratic primary featured a thought-to-be-inevitable frontrunner in Lyndon Johnson, the incumbent president. None of the party’s top prospects dared challenge Johnson. But the Vietnam War created an opening for an anti-war progressive, exploited by underfunded longshot candidate Sen. Eugene McCarthy.

After McCarthy came shockingly close to winning the New Hampshire primary, Robert F. Kennedy sensed Johnson’s weakness and jumped into the race. That prompted the once-inevitable president to throw in the towel on his reelection bid entirely and quit. Kennedy won a string of contests, but tragically did not make it to the Democratic Convention when he was assassinated after winning the California primary in June.

In O’Malleyland’s eyes, Sanders is McCarthy and O’Malley is Kennedy, the young, handsome Catholic pol.

While they agree on most issues, Sanders is an anti-politician at a time when politicians are not liked, while O’Malley looks like a central casting candidate. And without a critical issue like the Vietnam War where the candidates differ, it’s unclear if O’Malley can draw a clear contrast with his rivals and distinguish himself.

“O’Malley’s advantage is that he’s not just out there on these issues, but he’s been very effective on these issues,” Glendening said, pointing to O’Malley’s track record in Maryland. “His other big advantage is organization,” Glendening added, pointing to the former governor’s years as a political organizer and operative before he sought elected office himself.

“Sanders’ support is just a representation of the explosiveness of these issues,” he added.

Indeed, even many of Sanders supporters don’t necessarily see him as presidential. And a danger for the self-proclaimed democratic socialist was on display this weekend, when he had to answer questions about a controversial 1972 essay, in which he wrote that women fantasize about being raped. Sanders called it “stupid" and said he was imitating the voice of the male chauvinist he was criticizing.

For the meantime, though, both candidates will be focused squarely on Clinton, not each other.

Take the O'Malley quiz