Xenoturbella bocki, first described in 1949 (ref. 1), is a delicate, ciliated, marine worm with a simple body plan: it lacks a through gut, organized gonads, excretory structures and coelomic cavities. Its nervous system is a diffuse nerve net with no brain. Xenoturbella's affinities have long been obscure and it was initially linked to turbellarian flatworms. Subsequent authors considered it variously as related to hemichordates and echinoderms owing to similarities of nerve net and epidermal ultrastructure, to acoelomorph flatworms based on body plan and ciliary ultrastructure (also shared by hemichordates), or as among the most primitive of Bilateria. In 1997 two papers seemed to solve this uncertainty: molecular phylogenetic analyses placed Xenoturbella within the bivalve molluscs, and eggs and larvae resembling those of bivalves were found within specimens of Xenoturbella. This molluscan origin implies that all bivalve characters are lost during a radical metamorphosis into the adult Xenoturbella. Here, using data from three genes, we show that the samples in these studies were contaminated by bivalve embryos eaten by Xenoturbella and that Xenoturbella is in fact a deuterostome related to hemichordates and echinoderms.