Principal loses job for defending police