The historians of later period depicted him as a 'hero' and called him, 'the Holy Warrior in the Path of the Lord'. Again, few others refer him as an example of personal greed, glorying over his immense accumulations. But, in reality, he was neither of those two described by the historians. Sultan Mahmud was neither a revolutionary warrior nor a mean accumulator. It is because from the evidences it is clear that he fought with Hindus and Mussalmans in a similar way to expand his empire and used his huge wealth for furthering the strength of his dominion.
Sultan Mahmud was a man with a strong mind power. His supremacy over the fellowmen was due to the depth of his thinking for which he could solve any complicated situation and read the character of those around him. He behaved like as if he was the one person born to command and he was very determined to be a great person.
Sultan Mahmud had a group of competent lieutenants like his Wazir, the great Khwajah Hasan Maimandi. He was a secular person even if he belonged to an orthodox Muslim family.
Sultan Mahmud expanded his kingdom as far as the Oxus by diminishing the last traces of the Samanid kingdom by 999 AD. He converted a large number of the Tartars of the plains to Islam. After all these, he was designated with the title Sultan. He also achieved a direct recognition from the Caliph to whom he made a formal pledge that he would proceed with a holy war against the Hindus every year of his life.
Sultan Mahmud crossed the Indian border in 1000 AD and in the next year he defeated and captured Jajpal near Peshawar. Then he moved forward to the Hindu capital, Waihand on the Indus and took over it.
First struggle with Anandpal:
Sultan Mahmud had his first battle with Anandpal, the son of the monarch of Jajpal in 1001 AD. He traversed the Indus for the first time in 1006 AD and captured the fort of Bhera, situated on the west bank of the Jhelum. Being perplexed and afraid, the Rai of the place escaped at that night.
Second struggle with Anandpal:
After getting control over the northern boundary, Sultan Mahmud started on a fresh mission into the Punjab. He started his second struggle against Anandpal from his position at Bhera. Now, his opposition was Multan in the south and the Anandpal in the east.
Anandpal could realise the seriousness of the crisis and pleaded to his brother rulers for help and formed a powerful alliance. The patriotic feelings became very strong among the people of Hindustan and its men took to arms. The rich women sold their jewels, while the poorer sort worked enthusiastically at the spinning-wheel in order to contribute to the expenses of the voyage which advanced to Peshawar.
The Hindus at Waihand were very strong in their numbers and they forced a battle on Sultan Mahmud who had strengthened his camp with channel works. But, unfortunately, Anandpal's elephant suddenly got frightened and fled away from the field, which caused a general panic and disorder among the Hindu soldiers who broke and fled. Thus, the opposition from the Indian nationals ever presented to Mahmud ended in a storm of mutual allegations. Therafter, he had no Indian allialce to fight against.
Sack of Nagarkot:
After the victory at Waihand, Sultan Mahmud rushed for attacking the temple of Nagarkot in 1009 AD, which was situated on the Upper Beas. He took away the enormous wealth accumulated in its tombs, which amounted to hundreds of maunds of gold, silver and jewels.
Attack on Thaneswar:
Sultan Mahmud attacked on the rich temple of Thaneswar and robbed its Vishnu idol before its Raja could plan any united stand against the invader. He took the idol of Vishnu to Ghazni and threw it into the hippodrome of the city.
The expedition of 1013-14 A.D:
After Anandpal, his son Trilochanpal reversed his father's policy. So, Sultan Mahmud Mahmud made another expedition to overcome his resistance during 1013-14 periods. Again, Trilochan's son, Bhim raised a solid defence in the Pass of Kashmir. Sultan Mahmud was defended in his attempt to force his way through the Kashmir Pass the first occasion when he was uncomfortable in India in 1016.
But as per the Muslim records, Sultan Mahmud had broken down the resistance of Trilochanpal and of the Kashmir forces which came to his help. But, Trilochanpal moved to the eastern part of the Punjab, in the Siwalik Hills and continued to generate disturbances for Sultan Mahmud.
The great attack of 1018-19 A.D:
Sultan Mahmud started his great expedition to the trans-Gangetic plain in the winter of 1018-19. He reached up to the Upper Jamuna and came to Mathura where he robbed the temples and levelled them to the ground, burning them with naphtha. After that, he sent a small force to Kanauj and the king Rajyapala of there fled across the Ganges at the enemy's approach.
Thus, Sultan Mahmud captured the seven forts of the huge city in a single day. He moved further triumphantly for some distance more and destructed the city in ruins.
The expedition of 1019-20 A.D:
The powerful Chandel ruler of Kalanjar, Raja Ganda formed a league of Hindu princes. He punished and destroyed Rajyapala for his fearfulness before Sultan Mahmud and raised his son to the throne. Ganda promised to help Trilochanpal, the son of Anandpal, in the recovery of his ancestral kingdom.
Sultan Mahmud made another expedition in the winter of 1019-20 to punish the remnants of resistance in the Punjab and scattered the army of Trilochanpal. This expedition ransacked Bari, it even advanced against Raja Ganda of Bundelkhand. But even then Ganda remained unbroken and he continued to challenge the invader. Finally, Sultan Mahmud determined to invade the Punjab and make it an integral part of his own kingdom. He appointed a Mussalman 'Amir' as the governor of the Indian province and brought about the destruction of Trilochanpal and his brave son.
Thereafter, it became easy for Sultan Mahmud to penetrate to distant territories as the Gangetic basin and Bundelkhand from his base in the Punjab. In the next year, Mahmud attacked again the Chandel king, Ganda and captured the strong fortress of Kalanjar. On this expedition, he tried to storm the rock-fort of Gwalior but failed to take over it. But, the Raja here submitted and made presents. After that his interest in attacking Hinduism was diminished as he had already robbed Hindu temples as much as was possible.
The next target for expedition was the rich kingdom of Gujarat. So, Sultan Mahmud along with a large number of horsemen started for the temple of Somnath on the coast of Kathiawar. After a desperate struggle he captured the barricades of Somnath, pushing aside a relieving force that came to the rescue of the barracks. Then Mahmud robbed the temple and fled away with all its fabulous wealth. He also broke down the enormous stone linga of the temple. Afterwards, he attacked the Chalukya ruler of Gujarat and drove him to the sea and even thought about an idea of settling himself permanently in that region. But his followers did not agree and was he had to be content with nominating a governor to rule over the province. He then returned to Multan via Cutch and the Sind desert, being harassed by the attacks of the Jats and troubled by a disloyal guide.
In the last years of Sultan Mahmud's life, he was busy in strengthening the western portions of his dominions. He made another expedition against the Jats of Multan in 1027. He died of a wasting disease in 1030 A.D. at an age of sixty-three. His rule revived the ancient Persian traditions and culture in India. Mahmud Sultan once imprisoned famous mathematician and philosopher, Albiruni.
The object of his Indian campaigns:
Sultan Mahmud's main object of expeditions in India was to establish a Turko-Persian Empire here. He was a Central Asiatic prince who was influenced by the Persian ideals. His army was not religious warriors but only trained veterans accustomed to fight Hindus and Mussalmans alike and linked them together in bonds of strict discipline and comradeship in arms. The present day historians do not call him an extremist. He punished any deviation or disbelief among his Muslim subjects. He went on destructing the temples more because they were the store houses of accumulated wealth.
Impermanence of his empire:
Sultan Mahmud's empire was spread from Iraq and the Caspian Sea to the Ganges and from the Oxus to Sind and the desert of Rajputana. Mahmud's extensive empire was not bound together by a strong administrative system. He had not enough skill for civil administration and his officials were domineering and dictatorial. Punjab was in a very chaotic condition and his soldiers were very cruel that the Islam and its followers were looked upon as terrifying trouble.
Sultan Mahmud had a vigilant control over the provincial governors and military commanders and dealt out impartial justice in all cases that came before him. But, All these were managed by a huge hierarchy of officials. He appointed the wazirs and other officials to look after the various issues of his empire. He made different gradation system in armies too. But, in spite of this elaborate organisation, the empire became unmanageable and the Sultan felt it to divide among his sons.