Embattled U.N. Ambassador Susan Rice on Thursday withdrew as the leading candidate to become President Obama's next secretary of state, avoiding a contentious confirmation battle between the White House and congressional Republicans.

Rice was considered a front-runner to be the nation's top diplomat after the post is vacated by Secretary of State Hillary Clinton. But Rice's prospects for confirmation dimmed since September, when she was first targeted by Republicans over her portrayal of the terrorist attack on the U.S. consulate in Libya.

"I am fully confident that I could serve our country ably and effectively in that role," Rice wrote to the president. "However, if nominated, I am now convinced that the confirmation process would be lengthy, disruptive and costly -- to you and to our most pressing national and international priorities."

Obama accepted Rice's withdrawal but took a swipe at the Republicans who had attacked her.

"While I deeply regret the unfair and misleading attacks on Susan Rice in recent weeks, her decision demonstrates the strength of her character, and an admirable commitment to rise above the politics of the moment to put our national interests first," Obama said in a statement.

Rice has been roundly criticized for portraying the Benghazi, Libya, attack as a spontaneous reaction to an anti-Islam video despite early evidence that terrorists were involved. Republicans charged that Rice was trying to shield Obama from political blowback ahead of the November election.

The Obama administration counters that Rice was relaying early reports that reflected the best intelligence available at the time.

White House officials said Rice's decision was dictated by political reality. Senate Democrats raised doubts about whether they could muster the 60 votes needed to confirm Rice at a time when Obama is already battling congressional Republicans over a slew of budget issues.

"It certainly wasn't an easy decision for the president. He very much wanted to nominate Rice," said Victoria Coates, an adjunct fellow at the Foundation for the Defense of Democracies and formerly a foreign policy adviser for Texas Gov. Rick Perry. "But there's so much conflict in the lame-duck session and at the beginning of the next Congress, it's a move to minimize clashes."

With Rice out of the running, Sen. John Kerry, D-Mass., is now considered the front-runner for secretary of state. Kerry, a longtime Capitol Hill voice on foreign policy matters and a former Democratic presidential candidate, could receive the kind of bipartisan support he'd need to win confirmation, officials said. But elevating Kerry would put his open Senate seat in play, and Democrats worry it would go to outgoing Sen. Scott Brown, a Republican.

The roil over Rice comes as Obama is remaking his Cabinet for his second term. In addition to the State Department, Obama is also looking to replace Defense Secretary Leon Panetta. A leading candidate for that job is former Sen. Chuck Hagel of Nebraska, who, like Kerry, is thought to have broad support in the Senate.

"I think both of them will be questioned vigorously but confirmed," a top GOP Senate aide said of Kerry and Hagel.

Rice could still land a post in the Obama administration. She is mentioned as a replacement for Tom Donilon, Obama's national security adviser, if Donilon decides to depart. Obama will meet with Rice on Friday at the White House, an administration official confirmed.