Gunmen disguised as police officers stormed the Shamshad TV building in the Afghan capital Kabul.
So-called Islamic State later said it was behind the attack.
But soon after Afghan security forces brought the raid under control, a Shamshad anchor was back on the channel, reporting on the assault.
At least three attackers were involved, armed with guns and grenades. The station said one blew himself up at the entrance gate while another went up to the roof to fire at security forces.
Staff were trapped inside, with some jumping out of windows and others escaping through a neighbouring building. Normal programmes were replaced with a still image.
Special forces had to blast their way through a wall protecting the station to enter.
A security guard has been confirmed killed and 20 people wounded.
The mother of a female journalist at the station told the BBC she had received no news of her daughter, hours after the attack.
One of the news presenters, with his hand bandaged from cutting himself on broken glass, gave details of the assault to viewers.
“We have all come back [to work], all our journalists and colleagues are back on duty,” he said.
“This is an attack on freedom of media but they cannot silence us,” the station’s news director Abid Ehsas told another outlet, Tolo News.
Shamshad TV broadcasts a wide variety of programmes including news and current affairs in the Pashto language. It is one of the BBC’s partner stations.
Kabul has been targeted repeatedly in recent months by the Taliban and IS. (Courtesy BBC)