WASHINGTON (AP) -- Barack Obama was within striking distance of the Democratic nomination heading into Puerto Rico's primary Sunday after top party officials agreed to seat Michigan and Florida delegates with half-votes, riling Hillary Rodham Clinton backers who threatened to fight to the August convention. Clinton won the Puerto Rico vote by a 2 to 1 margin, but still falls short of being able to gather enough delegates. A territory, Puerto Rico cannot vote in the fall general election.
The Rules Committee's compromise decision sought to end a bitter dispute that threatened Democrats' chances for the White House but it was a blow to Clinton, whose struggling campaign had pressed hard for a full reinstating of all 366 delegates from the two states.
It drew irate reactions from her supporters in the audience and her chief delegate counter, Harold Ickes, who angrily said the former first lady was reserving her right to appeal the decision. That could drag the debate to the Democrats' nominating convention in August, potentially dashing hopes for party unity ahead of the November general election.
The resolution increased the number of delegates needed to clinch the nomination to 2,118, leaving Obama 66 delegates short, but still within reach of the nomination after the three final primaries are held in the next three days, starting with Puerto Rico on Sunday.
Obama, on the verge of making history as the first black Democratic presidential nominee, has focused his attention on the November battle, stepping up his attacks against Republican John McCain while rallying to sidestep repeated controversies sparked by some of his supporters.
The first-term Illinois senator resigned from his church in Chicago in the aftermath of inflammatory remarks by his longtime pastor, the Rev. Jeremiah Wright, and more recent fiery remarks at the Trinity United Church of Christ by another minister.
Trinity released a statement Saturday night saying: "Though we are saddened by the news, we understand that it is a personal decision. We will continue to lift them in prayer and wish them the best as former members of our Trinity community."
"This is not a decision I come to lightly ... and it is one I make with some sadness," Obama said Saturday said at a news conference in South Dakota after campaign officials released a letter of resignation sent to the church the day before. South Dakota and Montana hold their primaries -- the last of the campaign season -- on Tuesday.
Comments by Wright blaming U.S. policies for the Sept. 11, 2001, terror attacks had inflamed racial tensions and posed an unwanted problem for Obama as he seeks to wrap up the nomination.
Saturday's ruling by the committee came after its members met privately for more than three hours. They announced it in a raucous hearing that reflected deep divisions within the party.
Clinton advisers conceded privately Obama will likely secure the delegates needed to win the nomination after the final primaries are held Tuesday night.
At issue was the fate of delegates from Michigan and Florida. The two states were stripped of their delegates for violating party rules by holding their contests early. Clinton won both primaries after all the candidates agreed not to campaign in either state. Nearly 2.3 million Democratic primary votes were cast in the two states.
The sticking point was Michigan, where Obama's name was not on the ballot.
Clinton's camp insisted Obama should not get any pledged delegates in Michigan since he chose not to put his name on the ballot, and she should get 73 pledged delegates with 55 uncommitted. Obama's team insisted the only fair solution was to split the pledged delegates in half between the two campaigns, with 64 each.
The committee agreed on a compromise offered by the Michigan Democratic Party that would split the difference, allowing Clinton to take 69 delegates and Obama 59. Each delegate would get half a vote at the convention in Denver this summer, according to the deal. It passed 19-8.
The committee also unanimously agreed to seat the Florida delegation based on the outcome of the January primary, with 105 pledged delegates for Clinton and 67 for Obama, but with each delegate getting half a vote as a penalty.
"Our main goal is to get this resolved so we can focus on winning Michigan and Florida," Obama said while campaigning in South Dakota. "There were compromises. ... I'm glad the DNC worked it through and I hope we can start focusing on substance as opposed to process."
Obama picked up a total of 32 delegates in Michigan, and 36 in Florida. That total included elected delegates, who are counted as half, and superdelegates -- party leaders who are free to vote as they chose. Clinton picked up 38 in Michigan, including superdelegates, and 56.5 in Florida.
Obama's total increased to 2,052, and Clinton had 1,877.5.
In South Dakota, Obama said he and his wife had been discussing his possible resignation from the church since Wright's appearance at The Press Club in Washington that reignited furor over remarks he had made in various sermons at the church.
He said it is clear that since he is a presidential candidate, any remarks made at Trinity by any speaker "will be imputed to me even if they conflict" with his stated views and values.
For months, Obama has been hamstrung by the rhetoric of Wright, whose sermons blaming U.S. policies for the Sept. 11 attacks and calls of "God damn America" for its racism became fixtures on the Internet and cable news networks.
Obama said weeks ago that he disagreed with Wright but initially portrayed him as a family member he could not disown. The preacher had officiated at Obama's wedding and been his spiritual mentor for some 20 years.
But six weeks after Obama's well-received speech on race, Wright claimed at a National Press Club appearance that the U.S. government was capable of planting AIDS in the black community, praised Nation of Islam leader Louis Farrakhan and suggested that Obama was acting like a politician by putting his pastor at arm's length while privately agreeing with him.
After that, Obama denounced Wright's comments as "divisive and destructive."
More recently, racially charged remarks from the same pulpit by another pastor, the Rev. Michael Pfleger, kept the controversy alive and proved the latest thorn in the side of Obama.
Obama made it clear he wasn't happy with the comments -- in which Pfleger pretended he was Clinton crying over "a black man stealing my show."
Pfleger issued an apology, saying he was sorry if his comments offended Clinton or anyone else, but the controversy persisted.
Clinton, meanwhile, campaigned in Puerto Rico, where polls show her with a lead that reflects her overall support among Latino voters. But officials here have predicted a turnout Sunday between 20 and 30 percent, which would not generate the vote totals Clinton aspires to get.
Still, the Clinton family has campaigned hard in the commonwealth. Hillary, Bill and Chelsea Clinton have spent 14 days on the island and by Sunday will have visited 48 of the territory's 78 municipalities.
Clinton kept a busy schedule Saturday, holding a health care session in the morning and touring San Juan's outer suburbs for the remainder of the day in flatbed truck caravans. She planned to return to South Dakota on Monday.