Image copyright EPA Image caption Heavy firing erupted after the attackers stormed the TV compound

At least six people and all four IS gunmen have been killed in a battle at the Afghan state television building in the city of Jalalabad, officials say.

Four of the dead worked for the broadcaster RTA. Two police also died.

The attack began when two suicide bombers blew themselves up outside the compound. The other two entered it and battled security forces for four hours.

So-called Islamic State claimed the attack, which is near an IS stronghold on the eastern border with Pakistan.

The Taliban also has a strong presence in the area but the group said it was not involved.

Image copyright Reuters Image caption Soldiers battled the gunmen and heavy firing was heard for several hours

Twelve employees, including the head of the station, were evacuated early in the attack but others were trapped in the building, which is near the provincial governor's compound.

A BBC Afghan service correspondent at the scene said the attack began when two gunmen on motorbikes blew themselves up about 30m (90 feet) away from the building.

Heavy gunfire then erupted and at least three loud blasts were heard before the security forces regained control. It was not immediately clear if the two attackers who entered the compound were shot dead or blew themselves up.

IS posted its claim on its news outlet Amaq, saying a "commando" operation targeting the broadcaster was under way.

Both the Taliban and IS have conducted a series of high-profile attacks in recent months on targets including Afghanistan's largest military hospital in Kabul and a military base in the northern city of Mazar-e Sharif.