Assembly of multi-component supramolecular machines is fundamental to biology, yet in most cases, assembly pathways and their control are poorly understood. An example is the type III secretion machine, which mediates the transfer of bacterial virulence proteins into host cells. A central component of this nanomachine is the needle complex or injectisome, an organelle associated with the bacterial envelope that is composed of a multi-ring base, an inner rod, and a protruding needle. Assembly of this organelle proceeds in sequential steps that require the reprogramming of the secretion machine. Here we provide evidence that, in Salmonella typhimurium, completion of the assembly of the inner rod determines the size of the needle substructure. Assembly of the inner rod, which is regulated by the InvJ protein, triggers conformational changes on the cytoplasmic side of the injectisome, reprogramming the secretion apparatus to stop secretion of the needle protein.