An "Islamic caliphate" has been declared in the Middle East and the group behind it, Isis, has now rebranded itself simply "the Islamic State". Panorama has spoken to a defector about life inside the feared jihadist group.

Isis is not an organisation it is easy to leave. We met a man who had - and he was terrified of the consequences. "The brutality of Isis terrifies everyone," he said. "My family, my cousins, my siblings are all still there. I fear for them. If they can't reach me, they will reach my family."

He was nervous, agreeing to record an interview only after several hours of discussion, over customary tiny glasses of scalding hot, sweet tea. He would talk to us only if we would not reveal his identity. He wrapped himself in a keffiyeh for our camera and we promised not to use his name.

He summed up the jihadists' tactics like this: "If you're against me, then you'll be killed. If you're with me, you work with me. You submit to my will and obey me, under my power in all matters."

'Heart impassioned'

There are few accounts of how Isis works. That is no surprise when Isis says it will detain as spies any foreign journalists who enter its territory. So we travelled to Turkey's border with Syria to meet the defector.

The border is a hinterland of safe houses and supply lines for the rebels in the Syrian uprising. Turkey has made clear that Isis is no longer welcome here, so it is possible to meet people who have sought refuge from the Islamic State.

Panorama: Find out more

The defector had initially joined an Islamist brigade of the Free Syrian Army to fight the Assad regime. He joined Isis when his whole tribe pledged allegiance to the group - and because he believed in creating an Islamic state.

His first orders, as an Isis fighter, were to attend a course on Sharia, or Islamic law. "Not the principles of Islam, the principles of the Islamic State. So they teach you the Islam they want," he said.

"It appeals to the heart and not to the mind, so that your heart becomes impassioned with their words. This is the first stage. The second stage is military exercises, military training."

He explained that Isis had learned the lessons from Iraq in the early days on the anti-American insurgency. Then, it alienated the Sunni population. In Syria, the defector said, Isis tried to do things differently as it entered each new town.

"In the beginning Isis used goodness with the population in order to attract the people and they provided them with what they needed in order to attract them quickly, because they suffered so much under Bashar and his regime," he said.

"Once Isis succeeded in attracting people they changed dramatically, from being good to being cruel and harsh. You're either with me or against me! There is nothing in between."

Sharia law

In all the towns and villages it controls, Isis has implemented its very conservative version of Sharia. Rules on appearance are strictly enforced: a beard for men, the full veil for women, this is required for the whole population.

"Anything that contradicts their beliefs is forbidden. Anyone who follows what they reject is an apostate and must be killed," the defector said.

Our producer met one woman who had fled with her husband and children to Turkey from Raqqa in Syria. She said an Isis fighter policing the streets had threatened her after she had accidentally shown one centimetre of her trousers.

"I was wearing it [abaya, or cloak] but I just forgot to lift it up, that's while I was getting out of the car. I don't know how he saw me, I really don't know. And he was Egyptian, unfortunately. He is not a Syrian worrying about a woman from his nation."

The defector said it was a deliberate Isis strategy to use outsiders to police the towns it took over.

"The Islamic State have brought in people from other countries, different nationalities who are quite young in age so that they can brainwash or indoctrinate them with their Isis ideology," he said.

"And so they control the areas, not through the local people but with their own forces and their own men whom they prepare for this task."

The jihadists of Isis wish to go back to what they see as a more pure form of Islam from the time of the Prophet and his companions. They believe in a literal interpretation of the Koran.

The lslamic State's leader, Abu Bakr al-Baghdadi has now proclaimed himself "Caliph", a descendant of Muhammad and of his tribe. He has demanded that all Muslims, everywhere, swear loyalty to him -a ruling condemned by other religious scholars around the region.

But Baghdadi is also spoken of as a cunning tactician. Some reports from Mosul, for instance, speak of confidence-building measures. Security barriers have been torn down to open roads, electricity lines restored, municipal salaries paid… if this does not work, Isis can rely on the whip and the sword, as it has done many times in the past.

Panorama: Isis: Terror in Iraq is broadcast on BBC One at 20:30 BST on Monday, 14 July.