The rebels were killed in a gunbattle that broke out in Kashmir 's summer capital , Srinagar , after troops surrounded a building where authorities had learned the militants had taken up positions .