There are two independent mol-ecules in the asymmetric unit of the title compound, C21H21N5O2. In each mol-ecule, the indolizine ring system is essentially planar, with r.m.s. deviations of 0.030 and 0.028 Å. The dihedral angles between the indolizine ring system and the pyrazole rings are 54.7 (3) and 8.6 (3)° in one mol-ecule and 54.4 (3) and 6.6 (3)° in the other. In the crystal, weak C-H⋯O and C-H⋯N hydrogen bonds link mol-ecules, forming a two-dimensional network parallel to (100).