Here’s the development in a nutshell of Deobandi and Barelvi schools …
British Involvement in India to create a diluting of Islamic traditions started to occur - there was a wave of lessening everything in to metaphoric meanings and secularisation of Islamic thought from real world issues - opting to choose modern techniques and systems, including the economic and penal systems. This created a reaction and the birth of the Deobandi school, influenced by Shah Waliullah … who was a Hanafi Sunni and Naqshbandi Sufi … Some of his works were around accommodating some of the modern thoughts in a traditional context … He was reacting to the situation at hand. Meanwhile, in the Arab world another form of modernisation was taking place where a large amount of text was being wholesale rejected and systematically ignored creating a very black and white form of Islamic interpretation that became the Wahabi movement.
So Deobandis in time pre-date the Wahabis, who in turn pre-date the Barelvi (reactionary) group … In time Deobandi thought grew and within a few decades the Barelvi school came mainly as a balancing force to counter the Deobandi position. Both the Deobandi and Wahabi position was designed to remove what they felt were “mythological” or “borrowed” concepts from cultures outside Islam. In their attempt to purify Islam and return it to a path of prosperity.
Wahabi movement differed from Deobandi movement in one major aspect - that was secularism … Deobandis advocated non-secular values - Wahabis advocated secular values and conservatism. Liberal manifestations were being rejected by both.
The Barelvi school was designed to show that traditions should not be rejected wholesale and started to encode a finer balance between practice and traditions than the Deobandi school and tried to maintain the Sufi message without blaming it as the cause of the Muslim demise.
Essentially the Barelvi school is probably closer to the traditions in their dogma, but suffer from elitism which loses the essence of Islam - out of the three Deobandis are more geared towards unification - but they harbour more political motives than the Barelvis. Wahabis are both political and elitist.