Hillary Clinton is facing a serious challenge for the Democratic presidential nomination from a charismatic progressive figure who has trailed her in national primary polls for months but captured the imagination of the party base.

It's 2008, and his name is Barack Obama. It's also 2016, and his name is Bernie Sanders.

At a rally Tuesday in Ames, Iowa, Clinton launched a new line of attack against Sanders, portraying the self-described democratic socialist as unrealistic in his pitch usher in a "political revolution" and enact policies such as single-payer health care.

"I wish that we could elect a Democrat who could wave a magic wand and say, 'We shall do this and we shall do that.' That ain't the real world we're living in!" Clinton said, according to the Associated Press.

Clinton launched an uncannily similar and sarcastic broadside on then-Senator Barack Obama—down to the phrase "magic wand"—as she took on his lofty message of "hope and change" at a rally on February 24, 2008.

"Now I could stand up here and say, 'Let’s get everybody together, let’s get unified the sky will open, the light will come down, celestial choirs will be singing, and everyone will know we should do the right thing, and the world will be perfect," she said in Providence, Rhode Island, drawing cheers and laughs from the crowd. She added, "I have no illusions about how hard this is going to be. You are not going to wave a magic wand and make the special interests disappear."

YouTube: HILLARY CLINTON QUOTE - " LET'S JUST GET EVERBODY TOGETHER & THE SKIES WILL OPEN "

The line of attack is indicative of Clinton's view—in 2008, and essentially unchanged in 2016—that being a fighter and understanding how to achieve results in a complicated system is an essential asset for a president, and one that trumps political idealism.

Clinton could be forgiven for feeling a flash of déjà vu as Sanders reveals himself to be perhaps a bigger threat than expected. Two polls released Tuesday illustrate the cause for her concern. A Quinnipiac poll shows Sanders leading by 5 points in Iowa, and a Monmouth poll shows him ahead by 14 points in New Hampshire.

While the prospect of losing the first two nominating contests is discomfiting for Clinton less than three weeks before the first votes are cast, the remainder of the primaries give her good reasons for optimism. According to FiveThirtyEight, Iowa and New Hampshire are among the three most Sanders-friendly states (the third is his home state of Vermont), based on their disproportionate share of white self-identified liberals, who make up the core of the Vermont senator's base.

As the primary moves to states like South Carolina and Nevada, where many black and Hispanic voters live, Sanders' challenges mount, considering that non-white voters overwhelmingly favor Clinton over him. That was not true of Obama, who won strong support among African-Americans, which boosted him particularly in the South.

Among national Democratic voters, Clinton leads Sanders by 52 to 37 percent, according to a NBC News poll released Tuesday.

Before it's here, it's on the Bloomberg Terminal. LEARN MORE