US did it during WW2, and it seemed to work out fine.
Only thing is that when they left, we made sure the Nazi's didn't come back.
Right now they were training Afghans to have their own military, but it's all so corrupt that it is just an impossible task. Those who can will flee the country instead of fighting for it.