Let E/F be an everywhere unramified extension of number fields with Gal(E/F) simple and nonabelian. In a recent paper, the first named author suggested an approach to nonsolvable base change and descent of automorphic representations of GL 2 along such an extension. Motivated by this, we prove a trace formula whose spectral side is a weighted sum over cuspidal automorphic representations of GL 2 (A E ) that are isomorphic to their Gal(E/F)-conjugates. The basic method, which is of interest in itself, is to use functions in a space isolated by Finis, Lapid, and Müller to build more variables into the trace formula.