The UK has an official Animals (Scientific Procedures) Act of 1986. The act, which serves to protect animal welfare, covers a number of different sections. Some of these include regulated procedures, scientific procedure establishments, breeding and supplying establishments, conditions and re-use of protected animals.
The act only identifies certain animals as "protected." Generally, the act specifies that a "'protected animal' for the purposes of this Act means any living vertebrate other than man." Despite the fact that they are invertebrates, the act also covers any members of the species octopus vulgaris from the stage at which it can independently feed.
Why this distinction? Octopuses are among the most intelligent and behaviorally flexible of all invertebrates. Hence, the UK found them intelligent enough to include them in the protection act.