A suicide squad of three militants attacked the heavily guarded Radio Kashmir complex in Srinagar on Saturday afternoon.
The three militants and two paramilitary jawans were killed. Three jawans were also wounded.
Witnesses said the militants had detonated the explosives in the car near the main entrance of the building.
"They then hurled grenades and fired on the paramilitary soldiers manning the bunkers on the main gate," said a traffic policeman.
Two militants tried to enter the main building, but alert jawans of the Centre Reserve Police Force opened fire, killing one of them.
Authorities rushed Border Security Force personnel to seal the area.
The troops later shot dead the militant who had entered the premises. The third one was shot near a mosque.
"We were inside the building when suddenly a deafening explosion shook the complex. This was followed by heavy firing outside. It was a miraculous escape," said an employee of Radio Kashmir.
Chief Minister Mufti Mohammed Sayeed strongly condemned the attack and said, "The militants have attacked the media and freedom of press."
He commended the courage of the director of Radio Kashmir, Rafiq Masoodi, and said, "Continuing the transmission despite the attack speaks volumes of their sense of duty and commitment to work."
Head Constable Shah Mohammad, Constable Veerachandra Yadav and Constable Sukh Kumar Singh of CRPF's 11 Battalion, who were injured in the attack, were granted out-of-turn promotions for displaying exemplary courage and bravery, a spokesman of the paramilitary force said.
This was the second suicide attack in Kashmir in the past 26 hours. On Saturday, militants had attacked the sector headquarters of the BSF at Bandipore. Six people, including two BSF soldiers, were killed.
The state administration had sounded a general alert in the valley following the spurt in militancy. Security forces were seen frisking passers-by and checking vehicles. Security around vital installations was increased in Srinagar.