TARHOUNA, Libya — Thousands of rebel fighters closed in around one of Libya's last pro-Gadhafi strongholds Monday, but held back on a final assault in hopes of avoiding a bloody battle for the town of Bani Walid.
The standoff came as rebel leaders in Tripoli said Libya's transition to democratic rule would begin with a "declaration of liberation" that was likely to come before Gadhafi's forces last strongholds were defeated and the fugitive former dictator had been captured.
The declaration would mark the start of an eight-month deadline for Libya's transitional council to arrange the vote for a national assembly, and eventually to a constitution and general elections.
"When the clock starts ticking on those eight months remains to be seen," rebel spokesman Jalal el-Gallal said, adding it wasn't yet clear how liberation would be defined.
Special U.N. envoy Ian Martin, meanwhile, said the United Nations was helping the rebel leadership prepare for its elections, stressing the country faces immense political hurdles after nearly 42 years of dictatorial rule.
"The U.N. is certainly ready to move very fast to bring in the electoral expertise that can assist the authorities," he said at a news conference in Tripoli with Ahmed Darrad, the interior minister.
The rebels most immediate concern is Bani Walid, a desert town some 90 miles (140 kilometers) southeast of Tripoli, where they say a small but heavily armed force of pro-Gadhafi fighters — at least some of them high-ranking members of his ousted regime — have taken up defensive positions.
The loyalists are spreading fear in the town to keep other residents from surrendering, the rebels say, telling people the rebels will rape their wives and daughters.
The regime loyalists "know if they hand themselves in, they will be punished. They are trying hard to mess things up, to drag other people with them into a battle," said rebel Col. Abdullah Hussein Salem.
Most of the country has welcomed the uprising that swept Gadhafi from power, though rebel forces — backed by NATO airstrikes — have yet to capture loyalist bastions like Bani Walid, Gadhafi's hometown of Sirte and the isolated southern town of Sabha.
Gadhafi has been on the run since losing control of his capital last month, though the rebels say at least two of his sons had been in Bani Walid in recent days. Moussa Ibrahim, Gadhafi's spokesman and one of his key aides, was still believed to be in the town, rebel officials said.
Talks broke down over the weekend after Ibrahim insisted the rebels put down their weapons before entering the town.
The rebels have extended to Saturday a deadline for the surrender of Sirte and other loyalist areas, though some rebel officials have said they could attack Bani Walid sooner because it has so many prominent loyalists.
For the most part, though, the rebels are urging patience, saying they want to avoid a bitter inter-tribal fight that could create lasting divisions.
"We won't go inside Bani Walid unless the Warfala tribe invites us," said rebel commander Ismail al-Gitani, referring to the town's main tribe. "The Warfala have to lead us into Bani Walid. Hopefully no one will be shot. We don't want to use our weapons. But if the Gadhafi loyalists shoot at us, of course we will return fire."
The Warfala are believed to be about 1-million strong, one-sixth of Libya's population.
Rebel commanders have said they were willing to hold more talks about the town's surrender, though apparently no negotiations were held Monday. Rebel negotiator Abdullah Kanshil added that the rebels were talking to individual families in the town about their urgent needs for water and food.
A field hospital with ten doctors also has been set up about 40 miles (60 kilometers) from Bani Walid.
"Our families in Bani Walid asked us to start this hospital just in case fighting breaks out," said Abdel Baset el-Beib, a doctor.
Associated Press writer Karin Laub in Tripoli contributed to this report.