Organs are made up of cells from separate origins, whose development and differentiation must be integrated to produce a physiologically coherent structure. For example, during the development of the kidney, a series of interactions between the epithelial mesonephric duct and the surrounding metanephric mesenchyme leads to the formation of renal tubules. Cells of the metanephric mesenchyme first induce branching of the mesonephric duct to form the ureteric buds, and they then respond to signals derived from them. As a result, mesenchymal cells are recruited to the buds, where they undergo a mesenchymal-to-epithelial transition as they condense to form nephrons. In contrast, the simple renal tubules of invertebrates, such as insect Malpighian tubules (MpTs), have always been thought to arise from single tissue primordia, epithelial buds that grow by cell division and enlargement and from which a range of specialized subtypes differentiate. Here, we reveal unexpected parallels between the development of Drosophila MpTs and vertebrate nephrogenesis by showing that the MpTs also derive from two cell populations: ectodermal epithelial buds and the surrounding mesenchymal mesoderm. The mesenchymal cells are recruited to the growing tubules, where they undergo a mesenchymal-to-epithelial transition as they integrate and subsequently differentiate as a physiologically distinctive subset of tubule cells, the stellate cells. Strikingly, the normal incorporation of stellate cells and the later physiological activity of the mature tubules depend on the activity of hibris, an ortholog of mammalian NEPHRIN.