First Lieutenant Darid Barakat sat on a foam mattress on the floor of a schoolhouse, men he once commanded alongside him, and his captors standing in a murky corridor outside.

There were 30 or so men held in the room – in what passes for a prisoner of war facility in a rebel-controlled part of Syria. Barakat and two others, both officers like him, were members of the Alawite sect. Another officer was a Shia, and the rest were all soldiers – and Sunnis – like the rebels now holding them.

The prisoners had been there since late July, not long after a plan by the Free Syrian Army to bring its uprising to the heart of the country's second city, Aleppo, was put into action by the rebel force in the city of al-Bab. Until that point, the local guerrillas had not fired a shot in 18 months of uprising.

Barakat and some others had worked at the military security office in the heart of al-Bab, 30km north-east of Aleppo. With him in the makeshift jail were captives from the nearby political security building and from all other corners of the regime's extensive police state.

The battle to take al-Bab had been a rout; the once formidable stretch of state buildings were destroyed and the defeated men who once worked inside were now at the mercy of an enemy whom they had dreaded.

"Of course, I know what happens in these situations," said Barakat, as he sat cross-legged in the garden of the schoolhouse early last week. "Prisoners were beaten, dissenters were chased and jailed. I thought we were going to get the same treatment."

The reputation for brutality in Syria's civil war is growing. While captured soldiers generally are treated better than intelligence officers – or the loathed Shabiha militias – allegations of prisoner abuse are rife on both the regime and rebel side. The execution of the three men who controlled the Shabiha in Aleppo has drawn the same sort of outrage levelled at regime abuses throughout the revolt. At the main rebel base in Aleppo, screams of prisoners being beaten could be heard throughout the night early last week.

"We've heard about it," said one of the al-Bab rebels. "That's not us."

Sitting next to Barakat, 35, was his jailer, a local Sunni sheikh, Omar Othman, who commanded the rebel unit in the area, named Katiba al-Ansar. Dressed in an exquisitely embroidered dishdasha and wearing a cast on his lower left leg, Omar asked Barakat whether he and the other men were fearful as the battle drew to a close.

"I swear, sheikh, that the guys were scared for a while," he replied. "They were scared from all the fighting and they were worried about what would happen."

The sheikh and his captive – the Sunni rebel leader and the Alawite officer – were getting deeper into conversation. Barakat agreed to let TheObserver listen in and asked that his name be used.

"I didn't expect you to treat us this way," said Barakat. "You give us food three times a day, Qu'rans, and even cigarettes."

"You would not have done the same for us," Omar replied.

"That's true," said Barakat. "There was a culture there."

"It was more than a culture," Omar replied. "It had become a way of life. Cruelty and oppression were what you guys did by instinct."

"It wasn't me," said Barakat. "It was the system. All I did is order guys to go out and beat people with sticks whenever there was a demonstration. I am not so connected to the regime, it was just a job to me."

Omar lifted his dishdasha and pointed at his cast. "You guys shot me," he said, pointing to the top of his left foot, which had been hit by a bullet during the fight for the military security building. "If you were not a big supporter of the regime, why did you work for military security [one of the most feared of Syria's intelligence agencies]?"

"Sheikh, I had no choice. This was our reality."

As the battle grinds towards a conclusion in Aleppo, Syria's warring parties are increasingly being forced to confront some uncomfortable truths. Themes now being openly discussed in scenes like this, as well as in meetings between elders, and even during moments of introspection on the battlefield, include: how did the society slide this far towards the abyss, and can anything be done to rescue it now?

Whether it likes it or not, Syria's Alawite minority was at the vanguard of the crackdown that followed the first stirrings of popular uprising in March last year, and which has now evolved into civil war. Also undeniable is that the opposition movement and guerrilla force is almost exclusively comprised of Sunnis, some of whom hold a grudge against the Alawites, whom they see as agents of a regime of persecution.

The spectre of of sectarian bloodletting looms as violence escalates nationwide and hopes for resolution continue to appear out of reach.

Yet both the sheikh and the Alawite lieutenant are anxious to dispel talk of longstanding enmity between their sects. The same case for cooperation is being made in political circles, although hardly with a booming voice.

"Do you hate us because we're Sunnis?" asked Omar.

"No, my sheikh, I swear," replied Barakat, leaning forward to touch Omar on the knee to press his point. "I don't hate you at all. The regime created all these hostilities. We had always gotten on as communities.

"Who buried our dead after the fighting, the regime? They were nowhere to be seen. It was your men who dug the graves and gave my men a burial."

Earlier that day, an old man in white desert robes arrived with a weathered elderly woman from the eastern city of Deir Ezzor. They asked to see Omar, then pleaded with him for the release of three of their nephews being held upstairs. The trio, one a former conscript, just 17, and two other hardbitten men in their late 20s, who looked much older, were brought to the courtyard and sat on cushions against the wall.

One of their colleagues had been pardoned the day before. Hopes were high among the three that they would soon also be free. "Our family has never been with the regime," said the old man. "It was just a job for these boys, and now it is finished. They are very grateful to be treated like this."

Despite the couple's 300km journey, Omar decided that freedom could wait for the trio – for now. "It won't be long," he said. "But we will let others go first."

Later, Barakat was animated and expressive. He had heard about the pardon and the family visit and clearly wanted to please his jailer. "You haven't told us anything yet," said Omar.

"I've told you everything I know," he replied. "Believe me."

Throughout the day, Sheikh Omar had been toying with the idea of releasing all the Alawite prisoners and most of the Sunnis over the coming days. He said he did not fear that the location of his base would be given up. "It's not a secret anyway. They know where we are, and if they don't all they need is Google Earth."

He stopped speaking for a minute, cupped his chin in his right hand, then said: "When was the last time you saw your family, your mother and father?"

Barakat looked at his feet and replied: "About two years ago."

"Would you go back to the army?" the sheikh asked

"No, I swear, I want to finish with the military and with fighting.

"Would you join us?

"I can't, sheikh. I just want to go home. I've had enough."

By now, Barakat's eyes were welling with tears. He stared straight ahead, doing all he could to maintain his composure. Then came the question that broke him.

"When was the last time you saw your wife?" Omar asked. Barakat managed the words "five months ago" before grief overcame him. As he sobbed into his hands, a young rebel brought him a glass of water and a napkin.

"You can go and see them," the sheikh said.

"God bless you all," Barakat said while wiping his eyes. "100 salaams (peace)."

"Can you take me to my village?" The question evoked laughter from all the five rebels sitting nearby. Barakat's family home is in the centre of the Alawite heartland, near Latakia on the coast.

"We will take you to the countryside and you can make your way from there," Omar replied.

"It isn't always like this elsewhere," said Omar after Barakat had left. "But they are military men and they must be treated well. We must show that we are better than what they were.

"Hopefully this small step will lead to something more. But I'm not sure."