Three terrorist gunned down in alleged police encounter