Russia is deeply involved with Afghan Taliban to neutralize IS
https://www.google.com.pk/amp/s/amp.cnn.com/cnn/2015/12/24/europe/putin-taliban-isis/index.html
China has security concerns wrt IS & engaging directly with Taliban for investment in areas which Afghan Taliban control
I believe it was contested between Mughals & Safavids over time
It went back and forth