I don't really know where to start but it's fair to say that I will never forget the past three days – for good reasons and bad. The urge to be in Tripoli when it was finally liberated was overwhelming and I made the mad scramble to get into the city. I was on the road for almost 20 hours through the western mountains and down towards Zawiya.

As we arrived at the outer suburbs of Tripoli, civilians were on the streets crying, hugging each other and waving flags. Women and children were ululating and sprinkling rose water over the cars that passed – a custom usually reserved for the bride and groom at weddings.

With celebrations such as these, I started to truly believe that we were on the home straight in ridding this country of its bloodthirsty, tyrannical, war criminal. But as we got closer to the centre of Tripoli the jubilant, celebratory people disappeared and the roads became eerily empty – there wasn't a single soul or car to be seen and all of the shops either side of the road had their shutters down.

As we wondered whether it was safe to continue we spotted someone by the side of the road who had been shot in the leg. One of the cars with us stopped to assist him and we got word of snipers up ahead so we had to make a quick U-turn. I spent a day or two on the western side of the city, helping out where I could, but with very limited resources this was difficult. Small clinics and pharmacies were being used as makeshift field hospitals but they were too stretched and under-resourced to cope.

On Tuesday, I made my way again towards the centre of Tripoli and found this part of town was much safer now. The battle for Gaddafi's Bab al-Aziziya compound had already begun and I accompanied Libyan technicals with rocket launcher, anti-aircraft guns, missile launchers – you name it – as they bombarded the main gates over the next six hours. Scrawled on the side of the technicals you could see place names – Misrata, Zintan, Yefren, Jadu, Zawiya, Sorman – which made it clear that Libyans from all corners of the country had descended on Bab al-Aziziya.

The resolve of these revolutionaries – and I now strongly believe more than ever that they shouldn't be called "rebels" – was remarkable to behold. Fearless young men that were barely of university age sat on top of these vehicles and drove full speed toward the gates of the compound, emptying their huge magazines before driving back to reload their weapons.

As the push on towards the compound continued, the local civilians came out of their houses to cheer us on. Women were lining the streets and crying, hugging each other. A refrigerated van with British number plates from Manchester was right at the front line distributing water, milk and juice to the revolutionaries. A man came out of his house and spread 20 or 30 boxes of cigarettes for revolutionaries to pick up should they wish to do so.

A local house was being used as a field hospital and the first time I went back there was to take a French journalist who had been shot in the leg by a sniper. Blood lined the floor and entrance, and doctors were shouting and running around frantically. Casualties were still streaming through the door and those that were "expired" (as the local doctors put it) were piled up on the floor at one side of the room as there wasn't anyone able to deal with them appropriately.

At the main hospital, it was much the same grim picture but multiplied 10 or 20 times. Some 50 doctors were working in the emergency department but even that was not enough. Some doctors I spoke to hadn't left the hospital in a week. I later made my way back to the frontline where the revolutionaries had just broken down the main doors to the compound. We entered behind the technicals and they pounded away at the second and third reinforced concrete perimeter walls.

On reaching the inner compound, hundreds – maybe thousands – of civilians and revolutionaries entered a large building at the back. As I walked towards it every person coming away from the building in the opposite direction had more guns than they could carry in their arms, alongside boxes of ammunition. It became apparent that the building was a huge weapons store.

People were fighting, pushing, throwing fists and falling over each other just to get in. I joined this scramble myself out of curiosity and inside I saw weapons stacked from floor to ceiling of every kind you can imagine – Kalashnikovs, sniper rifles complete with infrared scopes and lights, grenades, rocket launchers, rocket-propelled grenades – you name it.

At the beginning, it would have been the freedom fighters from all over Libya that were grabbing weapons – something I would be comfortable with – but the mad scramble after that was mainly from the civilian population, possibly even civilians from some of the loyalist areas – who is to know? Mass distribution of weapons among the civilian population can never be a good thing.

Later, I was working in the Mitiga air base, where there is a hospital. Around dusk, a large truck turned up unexpectedly with bodies piled in the back, all riddled with bullets. To cut a long story short, an injured person was later brought to the hospital who told us what happened. They were all held or captured over the past week or two in different areas of Tripoli and they all ended up in a school that was being used as a prison by Gaddafi brigades/loyalists. When their guards retreated, they executed all the prisoners – except this injured guy who got shot in the leg and hand then pretended to be dead.

He was able to identify most of the 17 bodies as he had spent some time with them and got to know them all. I took pictures one by one of them and documented all the injuries to their bodies (many of them shot in the head). It was a pretty traumatic experience for me – I spent three hours doing that in a gown and gloves, sweating buckets. With the stench from them all, I gagged a lot – almost vomited quite a few times. These are the kinds of crimes that need to be documented in case Gaddafi is captured.

Loyalist extremists still threaten the stability of Tripoli and checkpoints have appeared in every neighbourhood. Barricades and roadblocks manned by civilians stop each car as it passes, sometimes searching it for weapons. Although this is a major inconvenience – what should be a 30-minute trip can now take up to four hours – it is an important step to restoring some kind of civil law and order in the city.

Considering the obstacles and the huge number of sacrifices that have been made, the 17 February revolution has done well to get to where it is now but as one of the fighters told me: "It is easy to burn and destroy things as we have done to Gaddafi, but the real revolution starts when we try rebuild Libya."