The epic defeat of Ottoman army of 100,000 men headed by Sinan Pasha in 1605 provided Shah Abbas the morals to complete his conquest of Greater Azarbaijan. He marched towards north Azarbaijan in winter of 1604 taking his time for the forces of Allahverdi Khan to return from Fars and join his camp in the spring. Then he dismissed the Khorasan garrison.The Iranian army took the well-fortified Ganjeh Castle under siege from April, 1606 asking the Ottomans to surrender. But their commander Mohammad Pasha who was originally from Tabriz refused as started a brave resistance.After a bloody war in which about 2500 Ottoman units were killed, the city of Ganjeh was captured on July, 5, 1606. Many Kizilbash units were killed too. Mohammad Pasha, the Ottoman governor of the city was taken captive and sent to the Mazandaran prison. Another account states that he was beheaded due to his mistreatment of Iranian captives, especially for his execution of a relative of Shah Abbas. Ottomans had taken control of the ancient city during a power struggle among Safavi princes. The history of the city of Ganjeh goes back to the Sassanid Empire however, some Arab historians date it to the time of caliph Al-Motevakkel and made up baseless stories of a governor seeing a dream in which a treasure is found in the region which sounds unfounded. The Iranian history has been systematically subject to sophism and fallacy as a tool to ignore the historical heritage of the region. With the collapse of the Safavid Empire in 1722, Ganjeh fell in the hands of Ottoman Turks once again. Nader Shah liberated Ganjeh and Tbilisi in 1735. In 1813, after the Qajar army was defeated by Russians, the infamous Gulistan treaty was signed which left Ganjeh with most of Azerbaijan and Georgia to Russians. The city changed name a couple of times (Elizavetpol, Kirovabad) until 1991 when the Azerbaijan Republic became independent and the city became Ganjeh again; famous for its Persian poet Nezami Ganjavi.