The fused pyrazole and pyrimidine rings in the title compound, C22H19BrN4O, are almost coplanar, their planes being inclined to one another by 2.08 (13)°. The dihedral angles formed by the mean plane of the fused ring system and the phenyl and benzene rings are 16.21 (4) and 82.84 (4)°, respectively. An intra-molecular N-H⋯N hydrogen bond is observed. In the crystal, mol-ecules form inversion dimers via pairs of C-H⋯O hydrogen bonds. π-π inter-actions, with centroid-centroid distances of 3.4916 (9) Å, connect the dimers into a three-dimensional network.