The contest is coming to a close as Puerto Rico votes on Sunday and Montana and South Dakota on Tuesday, finishing a process that began five months ago in Iowa. Even if those results do not put Senator Barack Obama over the top, aides to both Mr. Obama and Mrs. Clinton said they expected enough superdelegates to rally behind Mr. Obama in the 48 hours after the final primaries to allow him to proclaim himself the nominee.

In many ways, Mr. Obama is wheezing across the finish line after making a strong start: He has won only 6 of the 13 Democratic contests held since March 4, drawing 6.1 million votes, compared with 6.6 million for Mrs. Clinton.

Mrs. Clinton has kept her counsel about what she might do to draw her campaign to a close. But when the rules committee of the Democratic Party divided up delegates from Michigan and Florida on Saturday night, Harold Ickes, a committee member and Clinton adviser, said she was reserving the right to contest the decision into the summer.

Coming to terms with loss?
Still, despite the fireworks, Mrs. Clinton’s associates said she seemed to have come to terms over the last week with the near certainty that she would not win the nomination, even as she continued to assert, with what one associate described as subdued resignation, that the Democrats are making a mistake in sending Mr. Obama up against Senator John McCain, the presumptive Republican nominee.

Her associates said the most likely outcome was that she would end her bid with a speech, probably back home in New York, in which she would endorse Mr. Obama. Mrs. Clinton herself suggested on Friday that the contest would end sometime next week.

But that is not a certainty; Mr. Obama’s announcement on Saturday that he would leave his church was just another reminder of how events continue to unfold in the race. She has signaled her ambivalence about the outcome, continuing to urge superdelegates to keep an open mind and consider, for example, the number of popular votes she has won. Gov. Phil Bredesen of Tennessee, a superdelegate who has been at the forefront of calling for uncommitted Democrats to make a choice soon after the last vote, said in an interview that Mrs. Clinton called him last week and urged him to “keep an open mind until the convention.”

Assuming Mr. Obama reaches the number of delegates and superdelegates he needs to secure the nomination in the coming week, Mrs. Clinton will be faced with three options, associates said: to suspend her campaign and endorse Mr. Obama; to suspend her campaign without making an endorsement; or to press the fight through the convention. Several of Mrs. Clinton’s associates said it was unlikely she would fight through the convention, given the potential damage it would do to her standing in the party, which is increasingly eager to unify and turn to the battle against Mr. McCain.

Clinton faces defections
Mrs. Clinton would almost surely face the defection of some of her highest-profile supporters, as well as some members of her staff. She would no doubt also face anger from Democratic leaders.

“In order for us to be successful in November, the runner-up is going to have to go all out in support of the nominee,” said Representative Chris Van Hollen of Maryland, chairman of the Democratic Congressional Campaign Committee. “The runner-up is going to have to be there from Day One. The support is going to have to be more than just lip service.”

Mr. Obama’s associates calculate he will need the votes of probably just 30 more superdelegates — elected Democrats and party leaders — to claim a majority of delegates after the last primary vote is counted, assuming expected outcomes in Puerto Rico, South Dakota and Montana.

With approval Saturday by the Democratic Party’s rules committee to seat Florida’s and Michigan’s delegates, though with a half vote each, Mr. Obama had secured 2,047.5 delegates, according to a count by The New York Times, leaving him 70.5 delegates short of what he needs to win the nomination. Eighty-six delegates are going to be allocated in Puerto Rico, Montana and South Dakota, and Mr. Obama is likely to get at least half of them.

Superdelegates uncommittedAs of Saturday, about 150 superdelegates remained officially uncommitted. Mr. Obama’s supporters have been hammering away at them, urging them to move quickly to his camp.

“A number of people have reported that various members intend to endorse AFTER the last primary,” said one e-mail message to wavering delegates from Mr. Obama’s supporters, its warning barely couched. “Those members need to understand that they won’t get any visibility from that.”

Gov. Bill Richardson of New Mexico, who endorsed Mr. Obama nearly two months ago, recently called Gov. Bill Ritter Jr. of Colorado, who has yet to endorse a candidate. “Hey, Ritter!” Mr. Richardson said. “After June 3, it means nothing. Those who take a little bit of a risk, he’ll remember you.”

On the other end of the line, Mr. Ritter demurred, saying he had pledged to remain neutral until the primary season ends.

Obama facing McCain
Mr. Obama has already turned his campaign away from Mrs. Clinton to face Mr. McCain. Mrs. Clinton is barely mentioned by Mr. Obama anymore, and his schedule is now focused as much on general election battlegrounds as it is on the remaining primaries. Mr. Obama is planning to mark the final election night of this primary season in St. Paul.

“That’s where the Republican convention is going to be,” said David Axelrod, the campaign’s chief strategist. “It seems like a good place to start the discussion about which direction we’re going to go as a country.”

Similarly, Mrs. Clinton and her aides have all but stopped their attacks on Mr. Obama, and the once vigorous Clinton war room has gone into a slumber.

Indeed, the talk in Mrs. Clinton’s headquarters has turned from the primary to more mundane matters: the next job, whom Mr. Obama might hire from the Clinton campaign, and even where to go on vacation.

The question in the weeks ahead is the extent to which the bitterness between these two candidates, both historic figures, can be erased. Two associates who spoke to Mrs. Clinton said they had no doubt that she would campaign for Mr. Obama without ambivalence, whether or not they end up as a ticket, one of the big questions lingering.

One of Mrs. Clinton’s chief strategists, Howard Wolfson, hinted that she was not inclined to carry the battle to the convention.

“Our focus is on securing the nomination for ourselves in the near term,” he said. “I don’t think anybody is looking toward the convention to end this process.”

While there are sore feelings on both sides, Mr. Obama has directed his aides to begin reaching out to their counterparts in the Clinton camp.

Mr. Obama’s advisers said he would make no formal statement of victory, with the assumption that the moment would be elaborately marked by the media.

At least a dozen uncommitted delegates are viewed by both camps as almost certain to side with Mr. Obama once the primary season ends. But there are dozens of uncommitted superdelegates who resisted endorsements for reasons that are personal, political and pragmatic — ranging from a fear of alienating contributors to reluctance among lawmakers from relatively conservative districts to be identified with either Mr. Obama or Mrs. Clinton.