However, the army was hopeless in battle against the western forces, particularly against the young Mahmud of Ghazni. Who was the ruler of Ghazni