Mountain tribes in the west, also called Amazigh, unite with opposition after decades of Gaddafi repressing their identity
"Have a good revolution," said the Tunisian customs officer, handing back our passports. We set out across the short stretch of no man's land towards Libya beneath a giant image of Gaddafi, his chin lifted, hands held together in a gesture of unity and victory.
Before we could reach him, a car bearing the flag of Libya's revolution raced out and its driver gestured us inside before speeding around the border post in a wide circle. We could make out the gaping expressions of the police and intelligence officers as they receded into the distance.
"This [is] all free now," the driver said, gesturing at the expanses of mountain and desert.
The roads in western Libya are clogged with makeshift checkpoints. Barricades built of burnt-out cars and rocks and manned by a patchwork of armed militias block the entrances to towns and villages. The fighters here are an assortment of turbaned Amazigh, or Berber, tribesmen, defectors wearing army uniforms and volunteers in mismatched combat fatigues.
The leaders of this uprising are equally varied: one burly military commander, Talibi, in civilian life is an Amazigh poet. Other revolutionaries we met were doctors, engineers, tribal elders, even a web-savvy youth in a baseball cap.
Night had fallen by the time we reached Nalut, where dozens of Amazigh tribesmen stood around campfires guarding barricades and manning checkpoints in the cold. Some carried weapons they had looted from army bases, the rest carried hunting rifles and clubs. The Amazigh we spoke to could not hide their euphoria.
"The fear of decades was broken after what happened in Egypt and Tunisia," said Khairy as he handed us small cups of green tea. The Amazigh have long struggled to retain their cultural rights in Gaddafi's Libya. "We never thought this could happen in our lifetime," he said.
On the outskirts of Nalut we were taken inside a small hut where four black men stood against a wall with their arms held out wide. The fighters flashed torches in their faces. "Mercenaries," one of the tribesmen said. They rummaged through the captives' bags to show us their belongings: a photo album, a few bits of clothing, some socks and a hat.
"We found knives on them," the tribesman assured me. But these terrified young men in their jeans, sneakers and sweaters looked to me like nothing more than young African migrants en route to Europe.
The following morning we went with Talibi, the poet-commander, to a small hill overlooking the highway. Talibi was planning an attack on the border post between Tunisia and Libya so that medical aid and opposition leaders could enter from the west.
Talibi shouted in Amazigh into his two mobile phones. His small guerrilla force of a dozen heavily-built tribesman milled around him, waiting for the order to attack. Between them they had four Kalashnikovs, a few hunting rifles and a stick.
He had spent a year in jail for organising Amazigh activities in defiance of the regime, he said, and his legs carry mangled scars which he said had been inflicted by the torturers of the regime. "They used a drill here," he said, lifting his trouser leg and pointing at three perfect circles. His other leg bore a long scar inflicted by a machete.
When the order was given the tribesmen raced in five pick-ups towards the border. The Libyan policemen opened the gate and let the tribesmen inside without a bullet being fired. As the cars slid to a halt one Libyan soldier ran out of a back door clutching his rifle.
The tribesmen spread out while the intelligence officers and the police huddled in a corner, clearly scared. "Those are the old people of the regime - a spy and former officer," Talibi said. "But now is not the time to take revenge. We need government and law and order, and then we can put them on trial."
Reports arrived that the army was sending reinforcements to the border and Talibi and his men moved out. The rest of the day was spent chasing a column of army pick-up trucks carrying heavy anti-aircraft machine guns. They tracked the convoy from a distance, exchanging intelligence with other tribesmen.
"Look at them they are so happy like they are on holiday," said Talibi.
Five men set up an ambush on a mountain pass while two sat perched on the edge of high cliffs, but the convoy never came through. It had sought shelter in a nearby army camp, the tribesmen said.
The following day we reached Zentan, 60 miles east of Nalut. The town is proud of being the first in western Libya to have risen against the regime, though the crackle of heavy machine guns still rings in the distance. Here, as elsewhere, charred cars and scrap metal block most of the access to the city, diverting traffic into easily defended entry points.
The centre of the town resembles a war zone. The principal buildings of the regime - the headquarters of the security apparatus and the popular committees - have been gutted by fire and adorned with new anti-Gaddafi graffiti. There were long queues in front of petrol stations and bakeries, and the area was running out of basic foodstuffs like sugar and rice.
Fighters waving pistols and Kalashnikovs guarded the gate of the hospital, where the rebels have set up their headquarters. They were tense and edgy. "Don't worry, we are just trying to stop the mercenaries from coming," said one man, waving his pistol nervously in the air as he spoke.
Abdul Satar, the commander of Zentan's most effective fighting unit, is a small and intense man who is prone to explosive bouts of shouting. He sat in one of the hospital's offices with a Kalashnikov at his knees, its bayonet fixed.
Zentan had settled into a certain kind of routine, after falling into the hands of demonstrators a week earlier, he said. The regime and the rebels are fighting a war of attrition, in which the regime sends small army units to fire randomly and then withdraw, while Abdul Satar and his men attack neighbouring checkpoints that have been harassing people as they entered and left town. He was just back from one of these attacks. They had killed one soldier and brought back three injured prisoners.
"We come out to attack them and then we come back and this is how it goes," said Satar. Where did they get their guns? "All our weapons have been captured from the army camps," he said.
Among the dishevelled and tired fighters at the hospital, Othman Zantani, an elegant and softly-spoken medical doctor, stood out. To tell the truth, he said, the revolution was not well co-ordinated.
"It's all happening spontaneously, but now we have to start organising ourselves. I am meeting with a lot of other towns and other tribal elders. We have to move from creating committees that will run daily affairs like health and security and providing aid to the people to creating a political committee that will represent the west of the country, just like what they did in the east. We will co-ordinate with them," he said.
One member of the security committee told me about plans to send weapons and ammunition to Tripoli and besieged cities like Zawiyah. A convoy of munitions was sent two days earlier but was intercepted by regime forces surrounding the city.
"The ultimate plan is to co-ordinate with our brothers from the east and march to Tripoli," said the security leader. "The plan was start marching yesterday, but that was postponed. You see the situation is flexible so we can't really plan, but we have to send armed men to Tripoli. Those are unarmed people who are being massacred. We have to help them."
A few blocks away from the hospital, the revolutionaries have set up a communications room in a nondescript office. There, at a desk covered with thick layers of dust and piled with three landlines, two mobile phones, nine chargers, two laptops and two packs of Marlbororo sits Omar, chain-smoking and glued to the screens of his many devices. He has a baseball cap pulled down over his face as he uploads video footage to YouTube, posts statements on Facebook and updates his contacts at al-Jazeera.
Others in the room were blogging and monitoring the TV and communicating with other activists. "Without this room the revolution would have died," Omar said. "We kept it going." He did not look up.