In friendlier times: Then-Maryland Gov. Martin O'Malley endorsed then-Sen. Hillary Rodham Clinton's first presidential bid in 2007. (Kathleen Lange/AP)

At the dawn of her presidential campaign, Hillary Rodham Clinton finds herself outflanked on the left by a former Maryland governor with little national reputation but many of the populist political talents she lacks.

Martin O’Malley is using Clinton’s closely watched and long-anticipated 2016 launch to raise his profile ahead of his own likely entry into the race next month. He has seized on specific economic and social policy issues, including same-sex marriage and an international trade deal, in a bid to raise questions about Clinton’s liberal bona fides.

The attacks — some more thinly veiled than others — have forced Clinton to explain herself on a number of difficult topics, which was not part of her plan for a gradual roll-out with an emphasis on middle-class economic issues.

It is a remarkable feat for an undeclared candidate who still lingers at the bottom of polls in a thin Democratic field.

O’Malley — a telegenic former Baltimore mayor who endorsed Clinton in her last presidential run — paints Clinton as slow to adopt progressive positions, overly cautious and poll-driven. He tells interviewers and voters in Iowa and elsewhere that he has held truly progressive views for years — and acted on them while in office.

Former Maryland governor Martin O’Malley is causing real headaches for Hillary Clinton. (Patrick Semansky/AP)

Their latest confrontation came this week after Clinton hedged on whether she would back a massive Asia-Pacific free-trade deal that she previously supported. O’Malley quickly fired off a Twitter message and video asking viewers to “join me in opposing” the deal, which is deeply unpopular among unions and many progressives.

“Americans deserve to know where leaders stand,” O’Malley said in a clear dig at the former secretary of state.

For Clinton — whose lack of significant opposition is off-putting to many progressives — O’Malley can be a useful foil, and her campaign is mindful not to be too heavyhanded with him. But if he continues to confront her, aides and advisers say, Clinton could be forced into open conflict with her party’s left flank far earlier in the race than she had hoped.

O’Malley is also subtly trading on his relative youth — he is 52, she is 67 — and his side gig as a musician who played in bars throughout his public service career in Maryland.

“I see, having spoken to younger people, people under 40, where our country’s headed,” O’Malley said in an NPR interview Tuesday.

His poll numbers, however, have hardly budged over the past year, bouncing between 1 percent to 3 percent among Democrats and Democratic-leaning independents. Clinton, by contrast, dominates the field, with the support of upwards of 60 percent of Democrats.

O’Malley and Clinton together in 2006. (Nikki Kahn/The Washington Post)

Sen. Bernie Sanders (I-Vt.), who is considering his own longshot bid for the Democratic nomination, also needled Clinton over trade this week. But it was O’Malley who garnered most of the attention, with major-league media coverage, new Internet advertisements and fundraising pitches.

Clinton’s campaign tied itself in knots last week trying to avoid calling her current position on same-sex marriage a shift, in part because O’Malley was saying she had flip-flopped. While both Democrats support what activists call marriage equality, Clinton said last year that state-by-state legal challenges to win that right were working.

So when Clinton’s campaign said that she now supports a constitutional amendment guaranteeing a right to same-sex marriage — which would supersede state laws — O’Malley’s team pounced. His PAC released a short video that included a clip from a recent speech in which he said that “history celebrates profiles in courage, not profiles in convenience.”

Left unsaid was that O’Malley has evolved on the issue as well. He championed Maryland’s same-sex marriage law in 2012 but only after similar legislation failed the year before. Prior to that, he was a supporter of civil unions as an alternative to marriage.

O’Malley has also highlighted his support for providing driver’s licenses to undocumented immigrants, an issue on which Clinton equivocated during her 2008 campaign.

In 2013, O’Malley signed a bill in Maryland making it possible for undocumented immigrants to get a “second-tier” driver’s license. While the license allows a person to drive, it can’t be used for federal identification purposes, such as boarding an airplane.

After she announced her support for such licenses last week, O’Malley told reporters that he was “glad Secretary Clinton’s come around to the right positions” on same-sex marriage and driver’s licenses for immigrants.

“I believe that we are best as a party when we lead with our principles and not according to the polls,” O’Malley said. “Leadership is about making the right decision and the best decision before sometimes it becomes entirely popular.”

President Obama’s Asia-Pacific trade deal represents one of the biggest political threats for Clinton. She had enthusiastically supported the deal when she was secretary of state, allowing O’Malley to attack her from the left as inconsistent while Republicans hammer from the right.

On Wednesday, O’Malley sent an e-mail to supporters with the subject line, “Hard choice?” — a clear reference to Clinton’s memoir “Hard Choices.”

“American workers whose jobs could be on the line right now are owed more than lip service,” O’Malley wrote, adding on Twitter that the pact was “a race to the bottom, a chasing of lower wages abroad, which does nothing to help our economy here at home.”

His political action committee has also purchased Web ads targeting voters in early nominating states that trumpet his opposition. One such ad appeared Tuesday on the Web site of WMUR, a station in New Hampshire, right next to its livestream of a Clinton event in the state.

Last week, O’Malley also embraced the cause of raising the federal minimum wage to $15 an hour — more than twice the current rate and a higher figure than Democrats in Congress are seeking. Clinton has said she supports raising the minimum wage but has not offered a specific number.

Clinton holds a lead over any potential primary challenger that is unprecedented in the modern political era. But her advisers know she is most exposed for the moment on her left, and, after her 2008 loss to upstart Obama, they say she is leaving little to chance.

Sen. Elizabeth Warren (D-Mass.), whose broadsides against Wall Street gluttony have made her the darling of progressives, has said she is not running. She has so far declined to endorse Clinton, saying she wants to know what Clinton will run on. And Clinton appears to be courting the Warren faction by running to the left on a number of issues.

O’Malley’s hard charge is an effort to give those same activists an alternative.

For months, O’Malley has also been pressing the case for tougher regulation of Wall Street — an issue where his advisers think Clinton is vulnerable because of her deep ties to the financial sector.

Lanny Davis, a longtime Clinton supporter, said that O’Malley “has a right to debate the issues... But the governor should be careful to be accurate if he’s going to criticize Secretary Clinton. She evolved on the issue of gay marriage over the years, just as most Americans have and just as Governor O’Malley has.”

O’Malley supporters say they think voters will start reassessing Clinton on the issues he has identified.

“Once the shine wears off of her new campaign, I think people will take note, or at least I hope they will,” said H. Boyd Brown, a Democratic National Committee member from the early presidential nominating state of South Carolina. “One of the reasons I’ve been a fan of Martin O’Malley is he’s led on some of these issues. In some cases, it’s taken Hillary Clinton decades to evolve.”

Former Colorado senator and presidential candidate Gary Hart said he plans to support O’Malley if he moves forward with a bid, in part because of the “generational change” he represents. “He is right now facing a leading candidate who is being very general and very vague, and he’s pointed that out, and I think that’s a good way to proceed,” Hart said.

O’Malley says he will decide by the end of May whether to run but is speaking like a candidate already.

“I believe that differences will become apparent, and over the next month, I am sure she will start to roll out her policy choices,” he told NPR. “When I get into the race, I will lay mine out.”