A senior U.S. official says the Sudanese government and the country's main rebel group could sign a framework peace agreement by this weekend.

The deputy assistant secretary of state for African affairs, Charles Snyder, told reporters in Nairobi that Sudanese Vice President Ali Osman Taha and rebel leader John Garang are tantalizingly close to signing a framework peace agreement.

"The parties have assured me, both parties, both Vice President Taha and Dr. John Garang, they can complete this discussion with goodwill on both their parts by Saturday or Sunday," he said.

Mr. Snyder says when he arrived at the talks he was fully prepared to pull out the entire U.S. delegation because he was not satisfied at the talks' progress. But, he says, after meeting with officials from both sides, he is now hopeful a framework agreement can be reached within the next few days.

Mr. Snyder says the government and rebels are now agreeing on the percentage of members of the legislature that will come from the north and the south, and have almost decided when elections will be held.

He says they have also agreed on details of presidential and vice presidential structures, and are close to agreeing on who will administer the Southern Blue Nile region and the Nuba Mountains.

Mr. Snyder says 90 percent of the issues have been dealt with.

Still to be agreed upon, says Mr. Snyder, is whether Sudan's capital Khartoum should be ruled by Islamic law or should be secular to accommodate those from the south, who are largely Christian or animist.

Mr. Snyder had harsh words for the continuing violence in the western Sudan area of Darfur. In that area, government troops and an Arab militia many believe is being backed by the government are fighting with rebel groups that are not part of the peace talks.

Mr. Snyder called the fighting ethnic cleansing. The Darfur conflict has created what the United Nations and some international aid groups are calling the world's worst humanitarian crisis.

"The lack of political will in the face of the tragedy that's unfolding in Darfur is simply not acceptable," he said.

Mr. Snyder says the continuing conflict in Darfur could threaten the progress and stability of the peace talks.

The talks have been going on for about a year and a half in the hope of ending 21 years of war between the Sudanese government and the rebel Sudan People's Liberation Army. The war has killed more than one million people and has displaced many more.

The U.S. official would not be drawn into a discussion of sending U.S. troops to Sudan. Earlier, U.N. Secretary General Kofi Annan said foreign intervention might be necessary in Darfur, but he did not say when or from which countries.