Amir Vali (also spelled Wali) was the ruler of Astarabad and parts of Mazandaran from 1356 until 1366, and again from c. 1374 until 1384. His relatively long reign was dominated by conflict with the Sarbadars and the Jalayirids, and ended only upon the arrival of Timur into eastern Persia.
Amir Vali was the son of Shaykh 'Ali Hindu, who had been a supporter of the Ilkhanid claimant Togha Temür and had served as his governor in Astarabad. In 1353 Togha Temür was murdered by the Sarbadars, who annexed Astarabad. Vali avoided the slaughter of Togha Temür's adherents and sought refuge with the neighboring Jauni Kurban tribe.
The Sarbadar state soon descended into civil war, and Amir Vali decided to take advantage of the situation. He moved to Mazandaran, which he used as a staging point to launch raids into the region of Astarabad. The city at that time was ill-equipped to handle such attacks, as many of the Sarbadar forces haddeparted to partake in the civil war. In order to recruit supporters, he claimed to be acting in the name of Togha Temür's son Luqman. By the time Luqman had arrived on the scene, however, Vali had apparently decided to rule in his own name, told Luqman to depart, and sent into exile his relatives and supporters. Furthermore, he declared for the Shi'a in order to gain the support of the Shi'as of Mazandaran against the then-Sunni Sarbadars. s After overwhelming a Sarbadar garrison near Astarabad, Amir Vali successfully fought three armies sent to subdue him, including one led by the Sarbadar leader Hasan Damghani himself. In 1356, after the defeat of the first army sent against him, he conquered Astarabad itself. He then expanded, taking Bistam and Damghan from the Sarbadars in around 1360.
Eventually the Sarbadars, who since 1361 were under the leadership of 'Ali Mu'ayyad, were able to mount a serious counteroffensive, and Amir Vali was forced out of his territories, including Astarabad, in c. 1366. This defeat proved to be only a temporary one for Vali. Soon after losing Astarabad, he established a new power base by seizing Semnan from the Sarbadars. He then attempted to regain Astarabad, but failed. The next few years after that he went on the offensive against the Jalayirids to the west, campaigning in the region of Rey. The Jalayirid Shaikh Uvais stopped him, but was unable to follow up on his victory. Uvais tried to convince 'Ali Mu'ayyad to attack Vali, but the Sarbadar considered him to be a useful buffer against the Jalayirids and refused to move against him. During this time he temporarily switched his allegiance back to the Sunni, although this apparently didn't give him the boost in support he expected, since he reverted to the Shi'a after a few years.