It happened with Pakistan too when USA has used Gen Zia against Russia in Afghanistan and Taliban were created with the help of ISI. Once USA achieved their goal then Pakistan was dumped and now Pakistan is in Mess.