Senator Lindsey Graham, a Republican from South Carolina and one of Ms. Rice’s fiercest critics, said Thursday that he respected her decision, but added in a statement that he planned “to continue working diligently to get to the bottom of what happened in Benghazi.”

In a letter she sent to Mr. Obama before her call, Ms. Rice attributed her decision to a recognition that “the confirmation process would be lengthy, disruptive and costly — to you and to our most pressing national and international priorities. The trade-off is simply not worth it to our country.”

Mr. Obama said he accepted her request with regret, describing her in a statement as “an extraordinarily capable, patriotic, and passionate public servant” with a “limitless capability to serve our country” — a line one official said signaled that Ms. Rice, who will continue in her job at the United Nations, remains a candidate for other top posts, including national security adviser.

Republicans are eager to see a new appointee, and should it be Mr. Kerry, his party’s 2004 presidential nominee, he would receive a far different reception. “I think she would have had a very hard time getting through,” said Senator John Barrasso of Wyoming, a member of the Foreign Relations Committee. Mr. Kerry, by contrast, is “immensely qualified and he would be easily confirmed,” he said.

For his part, Mr. Kerry heaped praise on Ms. Rice. In a statement, he said, “As someone who has weathered my share of political attacks and understands on a personal level just how difficult politics can be, I’ve felt for her throughout these last difficult weeks, but I also know that she will continue to serve with great passion and distinction.”

The drama over Ms. Rice, an outspoken, fast-rising diplomat with close ties to Mr. Obama, began on the Sunday after the Benghazi attack, when she appeared on five television news programs and characterized it as a spontaneous attack gone awry rather than a premeditated terrorist attack. Republicans seized on her remarks in an election-year effort to undermine Mr. Obama’s counterterrorism credentials. Later, after Mr. Obama offered a passionate defense of Ms. Rice, it seemed destined to become a showdown between a re-elected president and Republicans on Capitol Hill.