Squid, octopi, etc have cognitive abilities that sometimes overtake that of "intelligent" mammals or birds. Yet common ancestors are about as far away as is possible in animal kingdom.
(And also please remember this when ordering calamari next time ;)
Edit: I very much enjoyed this bestseller popular science book on invertebrates intelligence: https://en.wikipedia.org/wiki/Other_Minds%3A_The_Octopus%2C_...