WASHINGTON—A major security-focused amendment to the Senate immigration bill, proposed by a pair of Senators one day before the legislation passed 68-32, might have played a critical role in making the overhaul more palatable to several more Senate Republicans.