The opposition was striking. Conservative and progressive groups alike fought it fiercely. Even a Republican lawmaker resisted it.