The tropical green seaweed Avrainvillea longicaulis is a low preference food for coral-reef fishes, and it produces a brominated diphenylmethane derivative called avrainvilleol that significantly deters feeding by reef fishes in field bioassays. In contrast to the pattern for fishes, the ascoglossan gastropod Costasiella ocellifera and the crab Thersandrus compressus live on and eat only Avrainvillea. The gastropod sequesters avrainvilleol from its algal host and uses this compound as an effective defense against predatory fish. The crab does not sequester chemical defenses; however, it is camouflaged when on Avrainvillea and thus also experiences less predation when associated with this alga. Specialization on this chemically defended seaweed allows Costasiella to deter and Thersandrus to avoid predation. When coupled with other recent studies of specialist marine herbivores, these findings suggest that predator avoidance and deterrence are major advantages associated with the evolution of feeding specialization among herbivorous marine invertebrates.