When the Curopalate Davith of Taikh conquered Malazgird (Manazkert) between 992 and 994 and expelled the Muslim inhabitants arousing widespread indignation in the Muslim world, Mamlan acted as a defender of the Muslim cause. He penetrated Armenia as far as Valashgird. Meeting the joint armies of Davith, the Bagratid Gagik I, and the Georgian king Bagrat II, he withdrew without giving battle. In 388/998 he led another army, this time joined by volunteers from 'Iraq and Khurasan, as far as the village of Tsumb, northeast of Lake Van, where he was met by the joint Armenian and Georgian armies. The encounter ended against expectation in a severe rout of the Muslim army despite its numerical superiority.
According to the only extant literary source Mamlan died in 393/1001 and was succeeded by his son Abu Nasr Husain. Mamlan's name, however, appears on coins at least until the year 405/1014. Thus either the date given for his death is mistaken or Abu Nasr, about whose reign nothing is known, continued to mint coinage in his father's name. According to the same source Abu Nasr died in 416/1025 and was succeeded by another son of Mamlan, Abu Mansur Vahsudan. Under Vahsiidan the first waves of migration of Oghuz (Ghuzz) Turks reached Azarbaijan, which gradually were to change completely the composition of its population. Late Armenian sources date the arrival of the Turks even earlier and describe it as one of the causes for the migration of the Ardzrunids and their people from Vaspurakan to Sebastaia (Slvas) and the cession of the former province to Byzantium in 1021. Such an early date for the coming of the Turks cannot be reconciled with the accounts of the Muslim sources.
The early Oghuz immigrants in Azarbaljan all belonged to the so-called Iraqi Tiirkmens, who were expelled from Khurasan by the Ghaznavids while their leader, Arslan Isra'il b. Saljuq, was cast into prison where he died c. 427/1034. The first group of Oghuz consisting of about 2,000 tents arrived in 420/1029 and was well received by Vahsudan and effectively employed against his enemies. The Armenians were strongly impressed by their first encounter with these mounted archers. Their presence did not halt for the moment the eastward pressure of Byzantium. Having previously taken Arjish from the Muslims, the Byzantines in 425/1034 expelled Abu'l Haija' b. Rabib al-Daula, nephew of Vahsudan and chief of the Hadhbani Kurds, from the fortress of Bergri northeast of Lake Van. As Abu'l Haija' was at odds with his uncle, the caliph intervened to reconcile them for the sake of recovering the stronghold. Their joint efforts led only to a short re-occupation before the fortress was definitely lost.
A second wave of Oghuz, much stronger than the first, arrived in 429/1037-8 under their leaders Buqa, Goktash, Mansur and Dana. Though Vahsudan established marriage ties with one of their leaders, they soon began to pillage the country. They sacked Maragha in 429/ 1039, burnt its mosque, and massacred many of the inhabitants. One group, which had settled in Urmiya, after a successful raid into Armenia was attacked on their return by the Hadhbanis because of previous friction between them. They killed many of the Kurds and pillaged the countryside. The Hadhbani leader Abu'l-Haija' b. Rabib al-Daula, who held sway over Urmiya, and Vahsudan united forces to expel the troublemakers. Many of the Oghuz were slain, while large groups left for Ray and Hamadan.
Others, however, stayed. In 43 2/1040-1 Vahsudan seized thirty of their leaders at a dinner to which he had invited them and then killed many of their men. As a result the Oghuz of Urmiya chose to leave for Mosul. In the next year another large contingent of Oghuz came from Ray fleeing before the Saljuq Ibrahim Inal. They were defeated and driven out by Vahsudan. Again in 435/ 1044 some 5,000 Tiirkmens returned to Azarbaljan from Mesopotamia through Diyarbakr and Armenia and occupied the town of Khuy (Arm. Her). The remnants of the 'Iraqi Tiirkmens were now firmly established in Azarbaijan. Soon afterwards Qutlumush, the son of Arslan b. Saljuq, joined them to take over their leadership.