Background: Brachiopods and molluscs are lophotrochozoans with hard external shells which are often believed to have evolved convergently. While palaeontological data indicates that both groups are descended from biomineralising Cambrian ancestors, the closest relatives of brachiopods - phoronids and bryozoans - are mineralised to a much lower extent and are comparatively poorly represented in the Palaeozoic fossil record. Although brachiopod and mollusc shells are structurally analogous, genomic and proteomic evidence indicates that their formation involves a complement of conserved, orthologous genes. Here, we study a set of genes comprised of three homeodomain transcription factors, one signalling molecule and 6 structural proteins which are implicated in mollusc and brachiopod shell formation, search for their orthologs in transcriptomes or genomes of brachiopods, phoronids and bryozoans, and present expression patterns of 8 of the genes in postmetamorphic juveniles of the rhynchonelliform brachiopod Terebratalia transversa. Results: Transcriptome and genome searches for the 10 target genes in the brachiopods T. transversa, Lingula anatina, Novocrania anomala, the bryozoans Bugula neritina and Membranipora membranacea, and the phoronids Phoronis australis and Phoronopsis harmeri resulted in the recovery of orthologs of the majority of the genes in all taxa. While the full complement of genes was present in all brachiopods with a single exception in L. anatina, a bloc of four genes could consistently not be retrieved from bryozoans and phoronids. The genes engrailed, distal-less, ferritin, perlucin, sp1 and sp2 were shown to be expressed in the biomineralising mantle margin of T. transversa juveniles. Conclusions: The gene expression patterns we recovered indicate that while mineralised shells in brachiopods and molluscs are structurally analogous, their formation builds on a homologous process that involves a conserved complement of orthologous genes. Losses of some of the genes related to biomineralisation in bryozoans and phoronids indicate that loss of the capacity to form mineralised structures occurred already in the phoronid-bryozoan stem group and supports the idea that mineralised skeletons evolved secondarily in some of the bryozoan subclades.