Mediates, together with protein p6, the early to late transcriptional switch by stabilizing the binding of host RNA polymerase (RNAP) to the late A3 promoter. Activates transcription from the late A3 promoter and represses the main early promoters A2b and A2c by modifying the topology of the sequences encompassing early promoters A2c and A2b and late promoter A3 in a hairpin. Proteins p6 and p4 bind cooperatively to an approximately 200 bp DNA region located between the late A3 and the early A2c promoters. Binding of p4 molecules induces the reorganization of the binding of protein p6, giving rise to the nucleoprotein complex responsible for the switch from early to late transcription. Interacts with host RNA polymerase (via C-terminus) (PubMed:8617213, PubMed:8799127, PubMed:9784366). Interacts with DNA; binds to the A2b, A2c and A3 promoters (PubMed:8617213). Interacts (via C-terminus) with the histone-like protein p6 (PubMed:12426390). Belongs to the phi29likevirus late genes activator p4 family.