Pakistan 's efforts against militants sheltering near the border with Afghanistan are seen as vital to efforts to defeat the insurgency in that country , while increased problems with militants in areas closer to Islamabad , such as Swat , raised concern about the stability of nuclear-armed Pakistan .