We have used a self-cleaving RNA molecule related to a subsequence of plant viroids (a "hammerhead") to study the length-dependent folding of RNA produced during transcription by Escherichia coli RNA polymerase. Transcript elongation is arrested at defined positions using chain-terminating ribonucleoside triphosphate analogues (3'-deoxyNTP's or 3'-O-methylNTP's). When the transcript can form the "hammerhead" structure it self-cleaves to give a truncated product. The experiment yields an RNA sequencing ladder which terminates at the length at which cleavage becomes possible; the sequencing ladder is compared to those generated by using a noncleaving transcript or by using [alpha-thio]ATP in place of ATP. We have shown that 15-18 nucleotides (nt) of RNA past the cleavage point must be synthesized before the transcript can self-cleave within a ternary complex, whereas RNA freed from the complex by heating can cleave with only 3 or more nt present beyond the cleavage point. There are sequence-dependent as well as length-dependent effects. The results suggest that 12 +/- 1 nt are sequestered within the ternary complex and are consistent with the presence of a DNA-RNA hybrid within the transcription bubble, as proposed by others. The results indicate that the "hammerhead" structure does not disrupt the hybrid. It appears that the RNA beyond the hybrid is not restrained by interactions with the enzyme, since the last stem of the self-cleaving structure forms as soon as the RNA composing it emerges from the DNA-RNA hybrid. Self-cleaving of the transcript offers a simple structural probe for studying less well-characterized transcription complexes. The relevance of the results to models for transcription termination is discussed.