The Kushan Republic was a short lived organisation set up by the native Kushans after the collapse of the Persian Empire, when the Rashidun Caliphate occupied Afghanistan. The first incursions of the Kushans were only minor and were easily put down. The Rashidun were sure they had won.
Having set up their regional capital at Kabul, the inept Caliphate found themselves with a rebellion on their hands. The Kushans received on and off independence for several years, even allying themselves with the Rashidun against Byzantium. But the Kushans knew when a backstab was most appropriate; they turned on their nominal overlords when the Byzantines invaded Tabaristan; and succeeded in conquering Afghanistan and neighbouring Pakistan. By the time of Abu Bakr's death, the Kushans were more than a match for the broken Rashidun.
Destruction at the hands of the Ummayads
However, they shouldn't have been so confident, since the Rashidun's successors, the Ummayads, were certainly a force to be feared. The Kushans squandered their advantage on a series of costly wars with the Khazars, which weakened its armies so much that when, in 666, the Ummayads invaded, the Kushan army just fled to the Pakistani hinterland. The Ummayads quickly established a firm hold on Afghanistan (and went to wipe out the Khazars, so securing their border), leaving the Kushans in ruins. The people still remained, but the republic was gone for ever.