How about we have a law that says if it can feel pain (eg. central nervous system) then it should have rights to protect it.
Beyond that, pretty much all animals think and have emotions, and that fact bolsters the need for legal protection.
Not that long ago in history we were having the same conversation about slaves and minority rights, this is just the next step, and one that I hope gains momentum.