Two gonads in gastropods release eggs or sperm into the coelom cavity, from which the kidneys extract and release them into the mantle cavity and then to the external environment. Gastropods can reproduce through internal fertilization if hermaphroditic, or external fertilization by releasing eggs and sperm into water. Fertilized eggs become trochophore larvae and then veliger larvae, going through metamorphosis to become juvenile and adult gastropods.