Pakistani troops agreed to end their crackdown in the region , and the militants said they will stop harboring foreign terrorists and will stop crossing into Afghanistan to launch ambushes .