A suicide attack by the Islamic State against one of Afghanistan's most popular Pashto-language TV stations killed at least two people in the heart of the capital on Tuesday.

The bomber detonated his explosives at the gates of the building, killing one security guard, while one of the three assailants slipped into the compound and killed an employee. At least 20 people were injured in the attack.

The militants, who wore police uniforms, battled for three hours with security forces, forcing the station to halt its broadcast and filling Kabul with the sound of gunfire and explosions. Shamshad TV was back on the air within hours, however, with one presenter appearing with bandaged hands.

The Islamic State claimed the assault through its online Amaq News Agency.

[After a bloody week in Afghanistan, elected officials seek answers from Ghani]

It was the latest attack on Kabul, once largely untouched by the violence racking the rest of the country but now a frequent target. Attacks by the Taliban and the Islamic State have claimed 250 lives across Afghanistan in the past month alone.

"The majority of our colleagues managed to flee," Shamshad TV director Abid Ehsas said in an interview with another station. "The number of wounded is high. Some were hurt by glass; some threw themselves off the building."

He called it an attack on freedom of the press, adding that the station had not received any threats preceding the violence.

The U.S. Embassy in Kabul condemned the attack, calling it a "terroristic act against free press."

Various media outlets — often accused by extremists of broadcasting racy music and other content they deem inappropriate — have come under attack by militants in recent years in Afghanistan.

The deadliest attack occurred two years ago when a suicide bomber targeted a bus carrying employees of the popular Tolo TV, killing more than 12. The Taliban said the attack was intended to avenge accusations by the station that the group's fighters had raped women during its assault on the northern city of Kunduz.

Like most local media, Shamshad TV airs anti-Taliban and anti-Islamic State public-service announcements.

The attack comes amid an escalation and expansion of violence in the country 16 years after Afghan forces backed by U.S. airstrikes overthrew the Taliban government.

[Afghan president, U.S. general vow ambitious air war to defeat Taliban]

Separately on Tuesday, U.S. forces in the country announced that their investigation found no evidence that civilians were killed during airstrikes in Kunduz province last week.

Over the weekend, lawmakers from the region alleged that dozens of civilians, including women and children, had died in a joint U.S.-Afghan operation.

"The USFOR-A investigation was conducted independently and concluded that there were no civilian casualties. Specifically, no hospitals or clinics in the local area indicated treatment of people with wounds from armed conflict," the U.S. forces said in a statement.

The conflicting reports of civilian deaths also prompted the Afghan government to launch an investigation. A spokesman for the Defense Ministry, Dawlat Waziri, earlier said the initial government probe showed that one civilian was killed and five were wounded.

Read more:

Boy in suicide vest kills at least 7 in attack on Kabul diplomatic enclave

Taliban attacks in Afghanistan kill more than 70 amid peace talks push

Anger and sorrow grip Kabul after devastating bombing in diplomatic zone

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news