Bacteria containing magnetosomes (protein-bound nanoparticles of magnetite or greigite) are common to many sedimentary habitats, but have never been found before to live within another organism. Here, we show that octahedral inclusions in the extracellular symbionts of the marine bivalve Thyasira cf. gouldi contain iron, can exhibit magnetic contrast and are most likely magnetosomes. Based on 16S rRNA sequence analysis, T. cf. gouldi symbionts group with symbiotic and free-living sulfur-oxidizing, chemolithoautotrophic gammaproteobacteria, including the symbionts of other thyasirids. T. cf. gouldi symbionts occur both among the microvilli of gill epithelial cells and in sediments surrounding the bivalves, and are therefore facultative. We propose that free-living T. cf. gouldi symbionts use magnetotaxis as a means of locating the oxic-anoxic interface, an optimal microhabitat for chemolithoautotrophy. T. cf. gouldi could acquire their symbionts from near-burrow sediments (where oxic-anoxic interfaces likely develop due to the host's bioirrigating behavior) using their superextensile feet, which could transfer symbionts to gill surfaces upon retraction into the mantle cavity. Once associated with their host, however, symbionts need not maintain structures for magnetotaxis as the host makes oxygen and reduced sulfur available via bioirrigation and sulfur-mining behaviors. Indeed, we show that within the host, symbionts lose the integrity of their magnetosome chain (and possibly their flagellum). Symbionts are eventually endocytosed and digested in host epithelial cells, and magnetosomes accumulate in host cytoplasm. Both host and symbiont behaviors appear important to symbiosis establishment in thyasirids.