Firefight after Israeli special forces’ cover was blown ‘nearly triggered new Gaza war’