With no advance warning, the Democratic race for president got a surprise new contender on Thursday.

Lincoln Chafee, the former Rhode Island governor who has a strong relationship with President Obama, announced his news in a web video and in an interview with Rhode Island Public Radio.

In the video, Mr. Chafee says almost immediately that as a United States senator he voted against the Iraq war — something that Senator Hillary Rodham Clinton supported. It was a position that was used against Mrs. Clinton in the Democratic primary leading up to the 2008 election against Mr. Obama.

“I would argue the decision to invade Iraq has destabilized” the Middle East, Mr. Chafee says in the video.

Unlike Jim Webb, the former Virginia senator, or Martin O’Malley, the former Maryland governor, both of whom have telegraphed their intentions to consider running for president for months, Mr. Chafee’s news caught political observers off guard.

A former Republican who became an independent, the one-term Rhode Island governor was elected in 2010 with Mr. Obama’s help. He went on to be a top supporter of Mr. Obama in his re-election campaign in 2012.

Mr. Chafee’s entry adds another white man into a potential primary stretch that Mrs. Clinton, who is expected to announce her candidacy soon, leads in early polls by as many as 50 percentage points.