The two nations have been struggling with armed militants sheltering along their mutual border .