The law passed despite dividing Republicans. Some of them said the measure was too restrictive; others objected to limited exceptions for rape and incest.