The beginning of nest building is preceded by a courtship ritual. This pair formation consists of the male and female swimming parallel to each other, the male and female facing each other and contacting their barbels, the male stimulating the flanks of the female, the swimming to the surface by the male and female and production of the first bubbles at the nest site, and adding further bubbles to the nest under construction. The male produces most of the foam. First, the male and female come to the surface and swim belly-up in small circles. The film of the air-water interface is swallowed and pumped out through the gills, where it gains mucus. Movement of the pelvic fins stirs the water and mucus, captures air bubbles, and breaks these air bubbles into a foam. The female may add some bubbles to the nest under construction. Pelvic fin movement differs between sexes; males move their pelvic fins in a side-to-side fashion, while females open and close their pelvic fins. The male often dives to the bottom to retrieve plant debris; filamentous nest materials are preferred, which are knitted together in the nest by the male. The male creates an upward water current with its tail fin that lift plant materials up. Then, the male uses its developed pectoral fin spines to cary the plant materials to the nest. The male uses its mouth and pectoral fins to incorporate the plant material into the foam mass of the nest. Females neither have developed pectoral fin spines nor do they help in transporting plant debris. The end result is a dome-shaped nest made up of loosely interwoven plant material on top of tightly interwoven plant material, held up to the surface with a layer of foam; the eggs will be laid on top of this foam from below.