A victorious army? There were cartridge cases all over the ancient stone laneways, pocked windows, and bullet holes up the side of the Sharaf mosque, where a gunman had been firing from the minaret. A sniper still fired just 150 yards away – all that was left of more than a hundred rebels who had almost, but not quite, encircled the 4,000-year-old citadel of Aleppo.

"You won't believe this," Major Somar cried in excitement. "One of our prisoners told me: 'I didn't realise Palestine was as beautiful as this.' He thought he was in Palestine to fight the Israelis!"

Do I believe this? Certainly, the fighters who bashed their way into the lovely old streets west of the great citadel were, from all accounts, a ragtag bunch. Their graffiti – "We are the Brigades of 1980", the year when the first Muslim Brotherhood rising threatened the empire of Syrian President Bashar al-Assad's father, Hafez – was still on the walls of the Syrian-Armenian hotels and silver shops. A 51-year-old general handed me one of the home-made grenades that littered the floor of the Sharaf mosque; a fluffy fuse poking from the top of a lump of shrapnel, coated in white plastic and covered in black adhesive tape.

Inside the mosque were bullets, empty tins of cheese, cigarette butts and piles of mosque carpets, which the rebels had used as bedding. The battle had so far lasted 24 hours. A live round had cut into the Bosnian-style tombstone of a Muslim imam's grave, with a delicate stone turban carved on its top. The mosque's records – lists of worshippers' complaints, Korans and financial documents – were lying across one room in what had evidently marked the last stand of several men. There was little blood. Between 10 and 15 of the defenders – all Syrians – surrendered after being offered mercy if they laid down their arms. The quality of this mercy was not, of course, disclosed to us.

The Syrian soldiers were elated, but admitted that they shared immense sadness for the history of a city whose very fabric was being torn apart, a world heritage site being smashed by rockets and high-velocity rounds. The officers shook their heads when they led us into the ramparts of the immense citadel. "The terrorists tried to capture it 20 days ago from our soldiers who were defending it," Major Somar said. "They filled gas cylinders full of explosives – 300 kilos of it – and set them off by the first entrance above the moat."

Alas, they did. The huge medieval iron and wooden gate, its ornamented hinges and supports – a defence-work that had stood for 700 years – has been literally torn apart. I clambered over carbonized wood and hunks of stone bearing delicate Koranic inscriptions. Hundreds of bullet holes have pitted the stonework of the inner gate. Below, I found a T-72 tank whose barrel had been grazed by a sniper's bullet which was still lodged in the sheath, its armour broken by a grenade. "I was inside at the time," its driver said. "Bang! – but my tank still worked!"

So here is the official scorecard of the battle for the eastern side of the old city of Aleppo, the conflict amid narrow streets and pale, bleached stone walls that was still being fought out yesterday afternoon, the crack of every rebel bullet receiving a long burst of machine-gun fire from Major Somar's soldiers. As the army closed in on the gunmen from two sides, 30 rebels – or "Free Syrian Army" or "foreign fighters" – were killed and an undisclosed number wounded. According to Major Somar's general, an officer called Saber, Syrian government forces suffered only eight wounded. I came across three of them, one a 51-year-old officer who refused to be sent to hospital.

Many of the rebels' weapons had been taken from the scene by the military "mukhbarat" intelligence men before we arrived: they were said to include three Nato-standard sniper rifles, one mortar, eight Austrian machine-pistols and a host of Kalashnikovs, which may well have been stolen by Syrian deserters. But it is the shock of finding these pitched battles amid this world heritage site which is more terrible than the armaments of each side. To crunch over broken stone and glass with Syrian troops for mile after mile around the old city, a place of museums and Mosques – the magnificently minareted Gemaya Omayyad stands beside yesterday's battleground – is a matter of infinite sorrow.

Many of the soldiers, who were encouraged to speak to me even as they knelt at the ends of narrow streets with bullets spattering off the walls, spoke of their amazement that so many "foreign fighters" should have been in Aleppo. "Aleppo has five million people," one said to me. "If the enemy are so sure that they are going to win the battle, then surely there's no need to bring these foreigners to participate; they will lose."

Major Somar, who spoke excellent English, understood the political dimension all too well. "Our borders with Turkey are a big problem," he admitted. "The border needs to be closed. The closure of the frontier must be coordinated by the two governments. But the Turkish government is on the enemy side. Erdogan is against Syria." Of course, I asked him his religion, a question that is all innocence and all poison in Syria these days. Somar, whose father was a general, his mother a teacher, and who practices his English with Dan Brown novels, was as quick as a cat. "It's not where you are born or what is your religion," he said. "It's what's in your mind. Islam comes from this land, Christians come from this land, Jews come from this land. That is why it is our duty to protect this land."

Several soldiers believed the rebels were trying to convert the Christians of Aleppo – "a peaceful people", they kept calling them – and there was a popular story doing the rounds yesterday of a Christian storekeeper who was forced to wear Muslim clothing and announce his own conversion in front of a video camera. But in wartime cities, you find talkative soldiers. One of the men who recaptured the entrance to the citadel was Abul Fidar, famous for walking between Aleppo, Palmyra and Damascus over 10 days at the start of the current conflict last year to publicise the need for peace. The president, needless to say, greeted him warmly at his final destination.

And then there was Sergeant Mahmoud Dawoud from Hama, who had been fighting in Hama itself, Homs, Jebel Zawi and Idlib. "I want to be interviewed by a reporter," he announced, and of course, he got his way. "We are sad for the civilians of this land," he said. "They were in peace before. We promise as soldiers that we will make sure a good life returns for them, even if we lose our lives." He does not mention all those civilians killed by army shellfire or by the "shabiha", or those thousands who have suffered torture in this land. Dawoud has a fiancée called Hannan who is studying French in Latakia, his father is a teacher; he says he wants "to serve his homeland".