Rebel fighters seized a village south of the Libyan capital and another group advanced towards Tripoli from the east on Wednesday in the biggest push in weeks towards Muammar Gaddafi's main stronghold.
Rebels firing their rifles into the air in celebration poured into the village of Al-Qawalish, just over 100 km (60 miles) southwest of Tripoli, after a six-hour battle with pro-Gaddafi forces who had been holding the town.
Rushing through an abandoned checkpoint where government troops had left tents and half-eaten bread in their rush to get away, the rebels ripped down green pro-Gaddafi flags, said a Reuters reporter in the village.
Farther north, on Libya's Mediterranean coast, rebel commanders said they had pushed westwards from the city of Misrata, taking them to within about 130 km (80 miles) of Tripoli. But they were taking casualties from government artillery.
The advances came as reports proliferated that Gaddafi -- under pressure from a five-month uprising against his rule, sanctions and a NATO bombing campaign -- was seeking a deal under which he would step down.
His government has denied any such negotiations are under way, and NATO's chief said he had no confirmation that Gaddafi was looking for a deal to relinquish power.
A senior Libyan official told Reuters on Wednesday there were signs a solution to the conflict could be found by the start of August, though he did not say what that solution might involve.
The rebel advances followed weeks of largely static fighting. Heavily armed Gaddafi forces still lie between the rebels and Tripoli, and previous rebel advances have either bogged down or quickly turned into retreats.
But with Al-Qawalish now in rebel hands, they can advance northeast to the larger town of Garyan, which controls the main highway leading into the capital. Libyan state television reported that NATO hit targets in Garyan on Wednesday.
A commander of a rebel unit which led the attack on Wednesday, Maktar Lakder, told Reuters rebel forces would advance on Garyan within a week.
The rebel attack on Al-Qawalish began at dawn. Fighters fired rockets and mortars, sending cries of "Allahu Akbar!" or "God is greatest!" echoing through groves of olive, almond and fig trees with each outgoing blast.
Gaddafi's forces responded with intermittent volleys of Grad tactical surface-to-surface rockets. Clouds of black smoke came from the hillsides where the incoming rounds exploded.
Six hours later, the rebels were in the village. About 400 fighters fanned out through the streets, which were otherwise deserted. A group of them broke into a shop and took bottles of soda to quench their thirst.
The handful of government troops who were taken prisoner were loaded into the backs of pickup trucks. In the back of one truck were three dark-skinned prisoners. Two of them told Reuters they were from Ghana and one said he was from Mali.
Libya's rebels have a particularly strong dislike for sub-Saharan Africans fighting with Gaddafi's forces because they say they are mercenaries. However, many of them say they were forced to take up arms.
When their truck slowed down, rebel fighters walking alongside hit the prisoners with their fists but the unit commander, Lakder, intervened to stop them.
The previous big advance in the region was last month, when rebels pushed 20 km (12 miles) north from their base in the Western Mountains to the town of Bir al-Ghanam.
Near Misrata, rebel commanders told Reuters they had pushed 20 km west overnight, their biggest single advance since Gaddafi's forces pulled out from the city itself back in May.
Reuters journalists were unable to confirm the advance independently because it was not immediately possible to reach the front line.
The new rebel positions were coming under intense bombardment from Gaddafi's forces using mortars, artillery and Grad rockets. A Reuters reporter said he could hear the sound of ordnance landing every few seconds.
Mohammed Al-Fortia, a doctor at a field hospital near the front line, said three rebels had been killed and 53 wounded. He said the dead included a former colonel in Gaddafi's air force who had defected and become a rebel commander.
The Reuters reporter saw one man brought in, still alive, with a bullet wound to the head.
"We are either going to die here or we go to Tripoli. There is no going back," said Al-Fortia.
Gaddafi, who has ruled oil producer Libya for 41 years, says the rebels are armed criminals and al Qaeda militants. He has described the NATO campaign as an act of colonial aggression aimed at stealing Libya's oil.
A Russian newspaper this week quoted what it described as a high-level source as saying Gaddafi is sounding out the possibility of stepping down on condition there is apolitical role for one of his sons.
A Libyan government spokesman denied that report, saying Muammar Gaddafi's future was not up for negotiation.
Libyan Deputy Foreign Minister Khaled Kaim said in an interview with Reuters in Tripoli on Wednesday that a solution to the conflict could be found before the Muslim holy month of Ramadan begins early in August.
He did not give details about what that solution might involve.
"There are signals that the crisis will find a solution in the coming weeks. We will do whatever possible so that our people will spend Ramadan in peace. So we hope that a solution will be possible before the month of Ramadan," he said.
"Currently the key hurdle to a solution is the NATO military campaign, and we hope that our friends in the African Union organisation will do whatever possible to convince it to stop its aggression against our people."
NATO Secretary General Anders Fogh Rasmussen said he had no confirmed information that Gaddafi had sounded out the possibility of stepping down.
"But it is quite clear that the end state must be that he leaves power," Rasmussen told a news conference in Brussels.