The metazoan transcription elongation factor P-TEFb (CDK-9/cyclin T) is essential for HIV transcription, and is recruited by some cellular activators. P-TEFb promotes elongation in vitro by overcoming pausing that requires the SPT-4/SPT-5 complex, but considerable evidence indicates that SPT-4/SPT-5 facilitates elongation in vivo. Here we used RNA interference to investigate P-TEFb functions in vivo, in the Caenorhabditis elegans embryo. We found that P-TEFb is broadly essential for expression of early embryonic genes. P-TEFb is required for phosphorylation of Ser 2 of the RNA Polymerase II C-terminal domain (CTD) repeat, but not for most CTD Ser 5 phosphorylation, supporting the model that P-TEFb phosphorylates CTD Ser 2 during elongation. Remarkably, although heat shock genes are cdk-9-dependent, they can be activated when spt-4 and spt-5 expression is inhibited along with cdk-9. This observation suggests that SPT-4/SPT-5 has an inhibitory function in vivo, and that mutually opposing influences of P-TEFb and SPT-4/SPT-5 may combine to facilitate elongation, or insure fidelity of mRNA production. Other genes are not expressed when cdk-9, spt-4, and spt-5 are inhibited simultaneously, suggesting that these genes require P-TEFb in an additional mechanism, and that they and heat shock genes are regulated through different P-TEFb-dependent elongation pathways.