Jalaluddin Hasan developed close relation with Muzaffaruddin Ozbek bin Pahlawan Muhammad (607-622/1210-1225), the sixth and last Ildenizid ruler of Arran and Azerbaijan. When Ozbek decided to deal with Nasiruddin Mengli, his deputy in Irak-i Ajam who had rebelled, he sought help from Alamut. Jalaluddin Hasan departed from Alamut under command of his army in 610/1214 to Azerbaijan, where he stayed at Ozbek's court. He remained for sometimes in Bailaqan with Ozbek, whence they sent joint ambassadors to Baghdad, Syria and other lands, seeking reinforcement in expelling Mengli from Irak-i Ajam. The Abbasid sent their army in command of Muzaffaruddin Wajh Sabu and an army was likewise sent from Syria. In 611/1215, a battle was fought near Hamdan, whereupon Mengli was defeated. After the victory, Jalaluddin Hasan was granted the provinces of Abhar and Zanjan.
During the year and a half that Jalaluddin Hasan was in Azerbaijan, Muzaffaruddin Ozbek treated him with great consideration and that was a brotherly feeling between them. Ozbek used to send him abundant supplies of provisions and excessive quantities of money, so much so that after meeting the requiremtns of Jalaluddin Hasan in the way of rations of every kind and after dispensing the gifts and robes of honours which he showered not only upon his great officers but also upon the generality of his troops he would still every day sent 1,000 gold dinars to his treasury for current expenses.