Prime Minister Yusuf Raza Gilani said the army would defeat the Taliban militarily but risked losing the support of the people if it did not help those forced from their homes in the country 's largest ever internal displacement .