A hard lesson and a ruthless political machine.