President Obama was perhaps the most unexpected winner of the first Democratic presidential debate.

The debate opened with a taped video message from Obama making a preemptive case for how much the nation has prospered under his leadership. Hillary Rodham Clinton and two of her rivals kept the argument going for him the rest of the evening on stage.

"There's a lot that I would like to do to build on the successes of President Obama," Clinton said, when asked by moderator Anderson Cooper how her presidency would differ from a third term for Obama.

Clinton has recently begun to distance herself from her former boss's record on the campaign trail, breaking with him on a Pacific Rim free trade pact and his strategy in Syria. But in her first appearance with the four other Democratic candidates before a national television audience on CNN, the former secretary of state played down those differences and tied herself closely to the administration she served.

She emphasized her support for the raid that killed Osama bin Laden and for economic sanctions on Iran that the president has called crucial to securing a deal on Tehran's nuclear program. She called Obama a "great moral leader" on issues of race and, on criminal justice reform, suggested that the government follow recommendations of a task force appointed by the White House.

Democratic presidental candidate Hillary Clinton says there is a lot she would do "to build on the successes of President Obama," but says her proposed plans go beyond his current politics. (CNN)

At one point, Clinton placed herself shoulder-to-shoulder with Obama, recalling a dramatic moment in 2009 when they went "hunting for the Chinese" to broker a deal on climate change at a conference in Copenhagen.

"We found out they were having a secret meeting," she said. "We marched up, we broke in, we said, 'We’ve been looking all over for you. Let’s sit down and talk about what we need to do.'"

Given the chance to critique Obama, Clinton chose instead to criticize Republicans for standing in the way of his legislative efforts. Even in one of her most vulnerable moments -- when former Rhode Island Sen. Lincoln Chafee criticized her support for the Iraq war -- Clinton used the president as a shield.

"I recall very well being on a debate stage about 25 times with then-Senator Obama debating this issue,” Clinton said, referring her 2008 campaign. “After the election, he asked me to be secretary of state. He valued my judgment. I spent a lot of time with him in the situation room going over some very difficult issues.”

"That was a brilliant answer," David Axelrod, Obama's former senior political adviser, said on CNN after the debate.

Two other Democratic candidates, former Maryland Gov. Martin O'Malley and former Rhode Island Gov. Lincoln Chafee, also praised the president.

"Thanks to President Obama, our country has come a long way since the Wall Street crash of 2008. Our country's doing better, we are creating jobs again," O'Malley said. He then noted that the country elected "a president, not a magician," and work remained.

On Syria, O'Malley said flatly: "I support President Obama."

Chafee swatted down former Virginia Senator Jim Webb's assertion that the Iran nuclear deal led to Russia's military offensive into Syria.

"I'm a strong proponent" of Obama's efforts on Iran, he said. "That Iran deal did not allow Russia to come in."

In leaving little room between herself and the president, Clinton may have gone a long way toward boxing out a late-stage challenge from Vice President Biden, who has been considering a run as Clinton has stumbled over the controversy surrounding her use of a private e-mail server to conduct government business at the State Department.

"Commanding night for . Showed again her vision, leadership. Good sign for Dems," former Obama campaign manager Jim Messina wrote on Twitter.

Another former Obama political adviser, David Plouffe, also praised her on Twitter: " tonight looked like someone who can win" in a general election.

In her closing statement, Clinton even cribbed a phrase directly from Obama's stump speech.

"At the heart of this country, its central idea, is the idea that in this country if you're willing to work hard ... you can make it if you try," Obama said on the campaign trail in 2012.

On Tuesday, Clinton echoed that, saying she wanted to "make sure that we get back to the basic bargain I was raised with: If you work hard and you do your part, you should be able to get ahead and stay ahead."