In order to explain why Pinchas killed Zimri, Chazal tell us that הבועל ארמית קנעין פוגעין בו. However, this law should not apply to the woman. Moreover, she was not even Jewish! So, under what Halacha was Pinchas allowed to do it?
(It seems like it may be because of avoda zara, or maybe this Halacha does apply to women).
Thank you so much in advance.