Barjawan was able to overcome the chronic problems in Syria, and appointment of Jaysh ibn Samsama as a governor general and the commander of the Fatimid forces, indicates a shrewd policy. Jaysh was a powerful Maghriba leader and was also a popular figure among the Mashriqa. Initially, he had four major problems to be confronted when he reached Syria: the rebellion in Tyre, the rebellion of Mufraj bin Dagfal, the unrest in Damascus and the Byzantine invasions into the Fatimid territory.
Jaysh at first moved into the action to subdue the rebellion in Tyre, an important port on the Mediterranean coast; whose inhabitants, supported by the Byzantines, had rose against the Fatimid suzerainty during the clash between Barjawan and Ibn Ammar. Their leader, a sailor called Ullaqah had declared Trye an independent, and issued new coinage with the slogan, "Dignity and plenty instead of humility and poverty. Amir Ullaqah" (uzzun ba'da faqah al-amir Ullaqah). Jaysh appointed Abu Abdullah al-Hussain and Ibn Nasir ad-Dawla al- Hamdani to lead the expedition against Trye, and himself stayed with the rest of the forces in Palestine, preparing another expedition against Mufraj bin Dagfal. He also ordered the governors of Tripoli and Sidon to join together with their warships in the forthcoming fighting against Tyre. In the ensuing battle, the Fatimid forces ravaged the Byzantine ships, and at length, Tyre fell before the onslaught of the Fatimid forces. The Fatimid troops entered the city and declared immunity (aman) and safe-conduct for all who remained in their homes. Ullaqah was arrested and sent to Cairo.
After suppression of rebellion in Tyre, Jaysh proceeded towards Palestine, where Mufraj bin Dagfal was plundering the towns and attacking the pilgrim caravans. When confronted with the big army of Jaysh, Mufraj capitulated and sent a delegation, asking for safe- conduct and promised to advance his loyalty to the Fatimids. Jaysh, who was pressed by more serious problems in northern Syria, accepted the offer of Mufraj and pardoned him, and withdrew his army to the north.
Jaysh thence advanced towards Damascus, and as soon as he entered the city, according to Ibn Athir (9th vol., p. 50), he declared that his prime objective was to wage war against the Byzantine and establish peace and security in Damascus. He also announced the death penalty for any one, whether his soldiers or other citizens, who proved guilty of disturbing the peace in the city. Jaysh then moved towards Hims, where the governor of Tripoli and his troops and a number of volunteers, augmented Jaysh's army in his fight against the Byzantines, who had besieged Afamiya at that time.
Jaysah arrived at Afamiya during the hour when the city was in great distress and about to fall into the hands of Byzantines. In the ensuing battle lasted for a few days, Jaysh faced defeat in the beginning. In the interim, a Muslim soldier managed to kill the Byzantine commander, causing demoralization among the Christian troops. The Byzantine troops were defeated, who took wild flight from the field. Jaysh followed the defeated Byzantines as far as Antioch and besieged the city for a few days, but he at once lifted the siege and returned to Damascus.
It must be remembered that Ibn Ammar had instituted a group of the young men (ahdath) from among the Maghriba in Damascus against the Mashriqa. The Ahdath, an urban militia, commanded by al-Rais (master) or al-Rais al-Bilad, whose influence exceeded that of the qadi. As armed and pugnacious men of the native-born population, the Ahdath had constituted in face of the political authorities. The Ahadath had assumed the principal power and were the main cause of the troubles in Damascus. Jaysah tried to cope with these elements and finally decided to eliminate them once and for all. During his early arrival in Damasus, he delayed his plan owing to the raids of the Byzantines on northern Syria. After suppression of the Byzantine influence in Tyre and the troubles created by Mufraj bin Dagfal, he returned to Damscus to strike a final blow on the Ahdath. According to Qalanisi (p. 51), he invited the chiefs of Ahdath to his camp which he had pitched outside the city, and had them killed. He at once besieged the city and sent his troops inside to search and kill the remaining ashes of Ahdath. This operation clean-up cost the death toll of 1200 persons and brought fear to the inhabitants, but Jaysh declared for their safe-conduct and promised security and peace under the suzerainty of the Fatimids. This was of course a bloody operation, but at the same time it was a last resort and the only effective solution to solve the problems of Damascus, where peace was restored for a long time. In sum, the major threat to the suzernaity of the Fatimids in Damascus was avoided.
During the first three years of al-Hakim's rule, two major anti-Fatimid uprisings occurred in Damascus. It was the untiring efforts of Jaysh ibn Samsama that these rebellions had been subdued in 388/998. Al-Hakim's aim was to win the loyalty, therefore, he paid due attention to the welfare of Damascus and appointed considerable governors, some of whom were recalled after only a few months. Thus, 21 governors are reported to have been appointed in Syria during the 22 years of al-Hakim's rule. He did not hesitate to dismiss any governor who exceeded his authority or caused discontent among the inhabitants.
Jaysh ibn Samsama died on 390/1000 at Damascus. His son went to Cairo with a paper on which his father had written his will and a detailed statement of all his property: all this, he declared, belonged to al-Hakim; his children had no rights. The property thus valued was estimated at 200,000 pieces of gold. His son brought all this before al-Hakim, who said, "I have read your father's will and the statement of the money and goods of which he has disposed by his will. Take it, and enjoy it in tranquility and for your happiness."