We are playing *Rise of the Runelords*, and were fighting Nualia and her minions in Thisletop. During the heat of the battle, Nualia was near death at just 12 HP. Her minion caster *fireball*ed the party that surrounded her. The party survived via making the save or simply soaking the damage. The *fireball* killed Nualia, and the party killed the rest of the minions.

When it came to tallying the XP, the GM rationalized that since party did not deliver the killing blow to Nualia, we do not receive XP for her demise - but we get the XP for killing the remaining minions.

Can the GM do this, and is it legal?