The story starts with ascendance of the Marathas in Bharat post Aurangzeb’s death. The Marathas had started taking over large parts of Bharat and the Mughal Empire was witnessing decline, the subjugation was so severe that the Mughal king was reduced to a mere tenant. The Red Fort was now unfurling two flags, one was of the Mughals and other was of the powerful Marathas with the actual power existing with the Marathas. The hold was so strong that the Mughal king could not move an inch & even a finger without the permission & approval of the Marathas.
It was the period when the Idea of Pure i.e. Pakistan was conceived. A person named Shah Waliullah, the classmate of the famous Muhammad ibn Abd al- Wahhab who founded the movement now called as Wahabi ideology. Shah Waliullah was educated in Arabia along with Abdul Wahab and was of the firm belief that a non believer i.e. Kafir cannot rule the Land of Pure which he considered the Mughal Empire to be. He could not tolerate that a kafir was ruling over Pak – the land of Pure.
It was the same period wherein Britishers were moving their forces towards Bengal & Hyder Ali had conquered Mysuru who later was succeeded by his son Tipu Sultan. Now there were two persons working towards idea of the Land of Pure, one in the north & other in the south of Bharat. Shah Waliullah was forming an alliance between Ahmad Shah Abdali, Najibullah of Rohilkhand & Asafuddaulah of Awadh which ultimately resulted as the Battle of Panipat, it was actually the conspiracy of Shah Waliullah. The Marathas were defeated in 1761 very badly but the aftermath was crucial & surprising. Ahmad Shah Abdali was unable to secure the victory into a strong foothold & was so badly harassed by the Marathas which forced him to ultimately leave Bharat. Also he was experiencing a rebellion in Afghanistan within in territory.
After this severe defeat the Marathas recovered tremendously & regained not just the supremacy but eventually spread their empire from Cuttack to Attock as popularly it’s always said that Maratha Samrajya Cuttuck se Attock tak faila huwa tha. This is the same place on the banks of Indus which was considered as the traditional boundary of Bharat then, beyond it was the Gaandhar which except during Mauryan Empire & sometime during the Mughal Empire was always not the part of Bharat or under any Bharatiya kingdom. During all this development, Tipu Sultan in south was attempting to create a Land of Pure, he also wrote to the Afghan King & even the Caliph expressing the need to establish this Land of Pure on the land of Unbelievers, the Infidels or the Kafirs seeking their assistance.
But to his unfortunate & our fortune the assistance never came because we had the powerful Maratha Empire in between. Ultimately the combined force of the Marathas, Nizams & the British defeated Tipu which ended the first dream of establishing the Land of Pure post Mughal Empire.
The second attempt was made by Sayed Ahmed Barelvi from Raebareli & not from Bareilly but still called Barelvi. He was the disciple of Shah Waliullah & similarly had a strong belief that a Land of the pure needs to be established in Punjab as it was ruled by Maharaja Ranjit Singh, he found it abhorrent that a kafir was ruling Punjab. He therefore gathered an army & marched over Punjab to launch Jihad against Maharaja Ranjit Singh which went on for long even after Raza Barelvi who lived around 1920s & 30s. After the collapse of Sikh empire post Maharaj Ranjit Singh’s death, one Sir Sayed Ahmed Khan continued the movement of formation of Land of The pure. He started out with a madrassa in Aligarh which later was converted into what is called Anglo-Oriental College which later became the Aligarh Muslim University of present day. The two-nation theory was formally proposed and propounded by Sir Syed Ahmed Khan in the Aligarh Anglo-Oriental College which had a strong foundation in the Islamic scriptures. Hence we can conclude that the idea of Pakistan or the Land of Pure has its roots deep in Islam & the seeds were sown long back in the 17th century.