The next period in Pakistan’s history begins with the defeat of Raj Jaipal and his son Anandpal, rulers of northern areas of Pakistan, and of the Ismaili and Carmathian rulers of southern areas i.e., Multan and Sind at the hands of Mahmud Ghaznavi, leading to the unity of the two region. Eleventh century ushered in an era of Muslim rule over the entire length and breadth of Pakistan. During the 32 years of his rule Mahmud invaded Pakistan and India more than 17 times and though he carried his successful arms up to Muthra, Kanauj, Baran and Gawaliar, he did not annex any area beyond Ravi. As such, Pakistan continued to remain separate from India, again looking westward constituting a part of the Ghaznavi Empire. The boundaries also were almost the same which had been coming down from the days of the Indus Valley Civilization. It will be notice that this phenomena of Pakistan forming a separate country with its eastern boundaries running upto either Ravi, Beas or Sutlej has been recurring again and again.

The Ghaznavid rule in Pakistan lasted for over hundred and seventy five years from say 1010 A.D. to 1187 A.D. It was during this period that Lahore assumed considerable importance as the eastern-most bastion Muslim power and as an outpost for further advance in the East. It was city of ghazis, saints and intellectuals. Apart from being the second capital and later on the only capital of Ghaznavid kingdom of Pakistan it had a great military and strategic significance. Whoever controlled this city could look forward to and be in a position to sweep the whole of East Punjab to Panipat and Delhi.

Contrary to the general belief that Mahmud Ghaznavi was a Hindu-killer or destroyer of Hindu religious places, he was extremely liberal towards them. His army consisted of a large number of Hindus and some of the commanders of his army were Hindus. Sonday Rai was the Commander of Mahmud’s crack regiment and took part in several important campaigns with him. The coins struck during Mahmud’s reign bore his on the one side and the figure of a Hindu god on the other.

Not only Mahmud Ghaznavi but his successors also were great patrons of Hindus. In fact some of the historians of the early period feel that the main cause of the fall of the Ghaznavid Empire was their excessive reliance on Hindus and the appointment of Hindus to positions of great responsibility. When in 1034 A.D. – 426 A.H., the Governor of Lahore, Ahmed Nial Tagin was suspected of rebellion, Sultan Masud Ghaznavi sent General Nath, a Hindu, to crush him. When Nath was killed in the fighting, Masud sent another of his Hindu generals, Tilak, who succeeded in killing Nial Tagin by treachery. This is the story of the Ghaznavids who are generally considered Hindu-killers.

It may be of interest to note here that Mahmud Ghaznavi’s exploits of Somnath and the destruction of the temple are mentioned only by Muslim historians. No Hindu record, either contemporary or of a later date, makes any mention of it. Unfortunately some Muslim historians had the habit of painting an exaggerated picture of the campaigns of their rulers which was exploited by English and Hindu historians of our own times to present Muslim rulers as destroyers of temples.

So far one of our objects has been to underline the fact that right from the days of the Indus Valley Civilization down to the end of the Ghaznavid rule at the fall of the 12th century A.D. over a period of more than four thousand years, Pakistan has been invariably a single, compact, separate entity either independent or part of powers located to her west; its dependence on or forming part of India was merely an exception and that too for an extremely short period. It was only when the Muslims established themselves at Delhi early in the 13 century A.D. that Pakistan was made a part of India, but not in the pre-Muslim period. And once Muslims’ successors in the sub-continent, the British, relinquished power in the middle of the 20th century, Pakistan reverted to its normal position of an independent country. Indian propaganda that the division of this sub-continent was unnatural and unrealistic is fake and fraudulent. Muslims had joined this region of Pakistan with India in the early 13th century A.D. when the Delhi Sultanate was formed; again Muslims have disconnected it from India giving it the normal and natural form which its geographical, ethnical, cultural and religious identity demanded.

“Barred from the east by desert and jungle, Pakistan in ancient time looked westward by land and sea. Only when, in the middle ages, powerful Islamic armies thrust through into the North Indian plains, was the traditional bias towards the west seriously modified; and even then the Indus region retained close and special cultural links with the lands which we know as Iran and Iraq.” (Ancient trade in Pakistan, By Sir Mortimer Wheeler).

“Periods during 2500 years of history when the Punjab, which is the most important section of the north-west, has been culturally assimilated to the rest of the sub-continent, or even to North India, are few if any at all. The centuries in which the Punjab and any substantial part of North India have been politically united are also few. It is then no surprise in our time to find Pakistan looking to the West rather than to the East. For that area the strongest ties of international life are the cultural. This is a current manifestation of an ancient tradition.” (Pakistan and Western Asia, By Norman Brown).

During this period of four thousand one hundred and fifty years, Pakistan was ruled by India only during the short 95-year period of Mauryan Empire which, for the greater part, was a Buddhist regime.