 Mohammad Gasem became known as Vali for frequent governances until it became their surnames.In 1285 Hijri, Gasem Khan Vali was dismissed from ruling Gilan and Ali Khan Vali was appointed as special servant of the royal court and achieved the chance to go to Atabat-e Aliat (Karbala) along with Naser al-Din Shah the next year.In 1288 when Gasem Khan Vali was appointed by Zell-e Soltan to serve in the government of Fars, Ali Khan did not accompany Gasem and stayed in Tehran.