The Afghanistan–Pakistan barrier is a partly-built border barrier being constructed by Pakistan to restrict illegal immigration and infiltration across the porous 2640 kilometers international border between Afghanistan and Pakistan.