Employment Relations Act 2000, ss103,103A
No, you can’t be fired for exercising your legal rights to raise a personal grievance.
Your employer must act fairly and reasonably: they must have good reasons for firing you and must have followed a fair process. You should ask your employer for a statement of reasons for your dismissal. This may help you with your case at mediation.