To the rebels of eastern Libya, it was always a matter of when. On Wednesday morning, sooner than many had expected, Gaddafi's men came for them.

A thundering burst of machine-gun fire just before 6.30am heralded the attack on the outskirts of Brega, a sand-strewn service town about 150 miles south of Benghazi. The loyalist forces had crept in during the night, patiently set up in an industrial area on the city limits, and dug in.

"They arrived in 60-70 Toyota trucks," said Wais Werfali, 40, who works in a nearby ammonia production plant. "They have set up a perimeter and are using families from the area as human shields."

By sunset, the battle had been joined by rebels streaming down from the city of Ajdabiya. A decisive phase in this war for control of eastern Libya had begun.

At least six people were killed in skirmishes that appeared to intensify throughout the afternoon and dozens more were wounded.

Most were rushed to an ill-equipped medical clinic at the centre of this low-set concrete town, where overwrought staff did the best they could to tend to battle wounds that were clearly not in the family medicine handbook.

"Bring blood, bring blood," a nurse screamed as she stood near a middle-aged man bleeding from a bullet wound in the groin. An Indian doctor joined in: "The people from the town have come here all morning to donate blood," he said. "We have some, it's over there."

But it wasn't. Nurses could insert only fluids into gravely wounded men, then wait for ambulances to take them to Ajdabiya, 60 miles up the highway. For some, they didn't need to bother.

As the last of the day's wounded were lifted into ambulances, three white cars came screaming into the hospital driveway. Nurses readied stretchers, then stopped as a man raised his Kalashnikov and shouted: "God is great, martyrs!"

The second of the trucks, a beaten-up utility vehicle pulled in front of the hospital. A crowd of about 100 swarmed around.

A doctor in a blue gown stood on the vehicle and, as a gunman fired into the air, the bloodied bodies of four men were carried into what served as an emergency room. Staff worked frantically, but briefly on the men – all locals – who were long since dead.

As the sun set on what some believe could be the opening battle of a civil war, a reckoning was taking place throughout rebel bases that less than a fortnight ago were pillars of Gaddafi's iron-fisted rule.Amid the charred ruins that serve as command centres, leaders were trying to establish just what the veteran dictator was aiming for.

The assault on Brega appeared to be more strategic than vengeful. The area held by pro-government forces on Wednesday consisted of a university, an airport, a wharf and some factories.

Access to the power supply that feeds Benghazi is nearby; so too is an oil refinery and the Sirte Oil Company, where more than 300 foreign nationals were employed before the 17 February revolution.

This does not have the sense of an insulted strongman striking out in fury; rather, it's more like a cold, calculated series of moves aimed at changing an equation that a week ago was considered irreversible.

In the past few days, Gaddafi's forces have advanced almost 120 miles from Sirte towards Benghazi, which is the seat of both a self-declared regional capital and a governing committee that is trying to organise the affairs of Libya's second city.

On Wednesday morning the committee made a plea to the UN to establish and enforce a no-fly zone to stop the subject of the rebels' greatest fear – the remaining loyalist pilots of Gaddafi's powerful air force.

Even as they spoke, all along the highway to Ajdabiya and the road to Brega, trucks carrying anti-aircraft weapons were trundling south. In Benghazi, meanwhile, most recruits at a rebel training base seemed interested in learning how to use the columns of anti-aircraft weapons lined up in a staging yard.

At the exit point of the city, known as the western gate, one 57-year-old man carried something a little more advanced – a shoulder-launched surface-to-air missile, which he said he'd been trained to use during the 1980s. The missile seemed to date from that era too, as did the old guns they hope will ward off the jets from the west, which are posing an increasingly lethal threat.

"They have been flying this morning and we shot one down," said a young member of the Ajdabiya civilian guard as he prayed next to the rocket launcher he'd been entrusted with.

Do you know how to use it? "Of course I do," came the reply. "Every man in Libya has had one year's military training, or in my case six months."

A large, growing, crowd at the nearby gate urged on cars and trucks that they saw were taking rebels to the front. The endless procession of cars carrying eager fighters into a grim unknown sometimes looked like the Wacky Races.

The cars moved 60 miles south-west along a flat desert highway, before veering right to Brega. Each crest in the road seemed to bring the risk of withering fire from an enemy beyond.

But as we crept closer to town, it became clear that the fighting was confined to Brega's industrial zone. Artillery shells thumped into the sand and mortars, apparently fired from inside the university towards rebel positions, cracked the air in the near distance.

As we pondered our options, the dreaded roar of a low-flying jet approached. A rallying point for rebels flooding into town wasn't a good place to be parked.

As we moved off, a louder explosion thundered behind us. Black smoke soon billowed from the precise spot where we had seen rebels crouched behind a ridge overlooking the university. Nightfall brought no news of their fate.

We travelled another couple of miles, before turning left onto the highway north. We stopped briefly to ask local militiamen for news about the road ahead. A second distinctive roar of a jet-fighter came into range, then within seconds the distinctive shape of a MiG fighter was zooming in fast and low towards us.

An enormous blast then cracked through the air about 200 metres to our left. Within seconds a black plume towered above us.

More trucks carrying anti-aircraft weapons rolled down the highway as we sped north. Occasionally, fixed positions on the outskirts of towns along the way fired randomly into the air. The Ajdabiya checkpoint was abuzz with rumours of a second pilot having ditched his jet and parachuted to safety earlier in the day.

One pilot, Abdul Salam al-Adiri, had done just that eight days ago and has been hidden ever since from would-be Gaddafi assassins as he recovers from two broken legs.

"I don't think he will walk properly again for the next year," his father told the Guardian earlier this week. "But I don't care and nor does he. He brought honour to Libya and he is a hero of the revolution."

As Gaddafi digs in Tripoli, and his loyalists encroaches eastwards, this appears to be a revolution in need of more heroes.

If the status quo of Gaddafi holding the west and the rebels holding the east is going to change, something has to give in coming days.

"He didn't send his people here to run away after a day long battle," said the factory worker, Wais Werfali.

"He is either trying to test the rebels' strength, or to make a big advance towards us. The people will defend themselves and we will win."

But even with the weapons at their disposal and the will to fight of the rebels and their recruits, their tools of battle seem threadbare.

Gaddafi's jets can bomb them whenever the going gets tough for his regular forces and mercenaries below and the strong tribal loyalties in the centre of country and parts of the west are so far proving to be a buffer against a wavering officer corps.

The battle of Brega – a small area, under what was ostensibly rebel control – likely has days left to play out. The real war seems just to be starting.