The victory margin was larger than expected after opinion polls had given him only a slight edge after a controversial campaign that pitted student protesters against police and turned the state into a " red machine " to deliver a yes vote .