At the end of the 15th century, the feudal breaking prevented the growth of producing forces in the towns and villages of Azerbaijan. The rise of big land ownership – soyurgals in the Aghqoyunlu possessions caused to the weakening of state au thority, decrease of profits of padiShah’s Treasury. The decrease of state lands and directly the tax incomings to Treasury destroyed the economic ground of central authority of Aghqoyunlu state.
Increasing internecine wars for the throne after the death of Sultan Yaqub (1490) resulted with that the exploitation of producers began to have unbearable and wild character. Fall of the producing of agriculture, starvation and epidemics aggravated the hard conditions of peasants, caused to the growth of popular disagreement, which sometimes turned into uprisings.
The circumstances of urban population, especially trademen and craftsmen of Azerbaijan were also bad. Unfiscated amount of taxes, especially the major tax of urban people – tamgha, which had been applied even in the Mongolian period prevented the rise of craft industry, as well as the growth of urban economy.
Ottoman conquests in Europe and Asia inflicted damage to European – Asian economic ties. Customary politics of the Ottoman Empire was hardly reflected in the economic circumstances of Azerbaijan and it especially broke off the arisen trade of its silkworm regions with Europe (by the vehicle of Venesians). This circumstances caused to the ravage of merchantry, which was engaged in silk trade, as well as the craftsmen that were engaged in producing of silk and which lost markets for their goods.
Disagreement of large stratums of nation found its reflection in the dissemination of Shiite trend of Islam and its radical sects. In 1499, Aghqoyunlu state in fact was divided into two possession with the capitals in Tabriz and Isfahan, which were weak military-administrative unions of small feudal entities.
In these difficult circumstances, many social stratums of Azerbaijan were interested in the establishment of unit Azerbaijan state with powerful authority, which would be able to stop feudal strife, accurate tax system and drawn out the country from crisis condition.
Southern regions of Azerbaijan, which were much more improved in economic relations became the centre of new state. The struggle of Ardebil sheikhs from Safavids origin, which had began in the mid of the 15th century, had not achieved success yet. Their claims confronted with great resistance of shirvanShahs, the rulers of Karakoyunlu and Aghqoyunlu.
New suitable circumstances for Safavids and their supporters shaped in the eve of 15th-16th centuries. The destroyed state of Aghqoyunlu was not strict power if resistance for Safavids and ShirvanShah was prevented by little forces. Foreign political factor assisted and accelerated the establishment of Azerbaijan Safavids state too.
In august of 1499, the people surrounded Ismail, who was in Ardebil sheikhs and who was hidden in Lahican, in the palace of local governor, waited for suitable movement for invasion. Of course, sheikh Heydar’s son was young and that is why, he obeyed to the advices of the supporters of his father. His major advisers were his guardian and tutor Hussein bey Lele, Abduali bey Dede, Khadim bey Khalife, Ilyas bey Aygut-son, Karapiri bey Kadjar, Rustam bey and Bayram bey from the tribe of Karamanlu.
Moving to West, Kizilbashes reached to Erzincan, where were gathered 7 thousand gazies (“soldiers for belief”) from the tribes of Shamlu, Ustaclu, Rumlu, Tekelu, Zulkadar, Afshar, Kadjar, Varsak, Pornak, as well as sufies from Karajadagh under the power of Ismail in the mid of 1500. In the assembly with kizilbash chiefs and wise men in Erzincan, there was made a decision to direct main blow against ShirvanShah Farrukh Yasar-sworn enemy of Safavids, as for Shiites Farrukh Yasar was the murder of Sheikh Cuneyd and Heydar, which died with the “death of murtyrs”.
In the autumn of 1500, Ismail moved from Erzincan in the direction of Shirvan. Troops of Ismail crossed the Kura and encountered with the detachments of Sheki. Before this, troops of the governor of South Georgia were defeated by kizilbashes without any difficulty. Many settlers of Shamakha, the capital of Shirvan, who learnt about the coming of kizilbashes escaped the city, as well as ShirvanShah himself hid in Gabala. Ismail occupied Shamakha without any resistance. It was obvious that, ShirvanShah was not able to prepare to the defence, as the invasion of kizilbashes was unexpectable. Due to collect his soldiers, who had been in their houses, ShirvanShah sent horsemen. When ShirvanShah learnt about the occupation of his capital, he directed to the fortress of Gulistan, near Shamakha. Here, on the foot of the fortress, at the end of 1500 Farrukh Yasar had to fight with gizilbahses in the location of Cabani. According to sources, firstly, shirvanShahs were overwhelming but then the attack of Shirvan infantrymen was encountered by kizilbash cavalry. This was one of the bloody battles, realized by Ismail: Shirvan troops were destroyed and escaped, ShirvanShah Farrukh Yasar died too.
Ismail, who saw that the attempts of his generals that were sent for the conquest of Baku failed, decided to intervene to this invasion himself and in the spring of 1501, he moved from Mahmudabad (where he passed the winter) to Baku. The defence of Baku was led by the wife of Qazi-bey, the son of Farrukh Yasar; Qazi-bey himself was not in the city. The city was surrounded by fortress with high walls and towers. It was washed by the water of the Caspian Sea in three sides and in the fourth side the city was defended by deep and wide moat. Neverthless, kizilbashes managed to put a mine under one of the towers. After the exploision, the tower was destroyed and three days later, kizilbashes entered to the fortress, Baku settlers concealed and opened the gates for Ismail. Sheikh demanded big contribution and confiscated the Treasury of ShirvanShahs, which was enriched with gold, precious stones, money and other valuable items.
From Baku, Ismail moved to the fortress of Gulistan, but he could not occupy it. Kizilbashes had to end the besiege of this fortress, which had prepared to hostilities very well. But, main reason was the news about that padiShah Alvend Aghqoyunlu began campaign with numerous troops from Tabriz to the northern direction. Military achievements of kizilbashes, commanded by Ismail disturbed the court of Aghqoyunlu a lot. Ismail called the assembly of his closest military commanders and supporters (Hussein bey Lele, Abdul bey Dede, Muhammed bey Ustaclu, Khadim bey Khulafa and Abdi bey Shamlu), who were considered “the pillars of power”. As medieval historians Hasan bey Rumlu and Iskender bey Munshi inform, Ismail asked them: “What do you want, whole Azerbaijan or only the fortress of Gulistan?” and they replied that “Azerbaijan”, since the major goal of the movement had been determined long ago. This answer meant one thing necessity of cessation of hostilities in Shirvan and determination of direction of major strike. Kizilbash military commanders directed to the South, to the river of Araz with their troops: they had to prevent uniting of the troops of Aghqoyunlu with the military forces that settled in the fortresses of Shirvan; that’s why, the troop, commanded by Ismail hurried up to encounter his enemy. Decisive battle among the enemies took place in the plain of Sharur, in the mid of 1501. Alvend possessed 30 thousandth army, when kizilbashes had only 16 thousandth troops. Historians mention that at the expense of general art of Ismail and individual courage of Kizilbashes, the battle ended with their victory. Kizilbashes obtained great trophy-horses, camels, mules, precious goods, golden and silver equipment. Destructed Alvend escaped to Erzincan, Ismail entered to Tabriz triumphantly and he was proclaimed new Shah, as well as became the founder of new ruling dynasty of Safavids.