The regiodivergent palladium-catalyzed C-H arylation of pyrazolo[1,5-a]pyrimidine has been achieved, wherein the switch in regioselectivity between positions C3 and C7 is under complete catalyst control. A phosphine-containing palladium catalyst promotes the direct arylation at the most acidic position (C7), whereas a phosphine-free catalyst targets the most electron-rich position (C3).