Seven people were killed in an attack on the Afghan ministry of information in Kabul, officials said.
An explosion was heard at 11:40 local time (07:10 GMT) and sporadic gunfire continued for over six hours before officials declared the incident over.
A ministry source said one of the attackers got inside the building.
The attack comes a day after talks between Afghan officials and the Taliban were suspended, but the Taliban said they were not behind the assault.
Among the dead were four civilians and three police officers, while another eight civilians were wounded.
Although Kabul still sees fighting, this attack follows months of relative calm.
The attack happened in a busy area of central Kabul, near one of the city’s most popular hotels, a couple of other ministries, and the presidential palace.
There were four attackers in total – all of whom were eventually shot dead by police officers.
The Serena Hotel, which is heavily fortified, is one of the few still used by foreign visitors.
At 18 storeys high, the information ministry building is believed to be one of the tallest in Kabul.
About 2,000 people were feared to have been stranded inside for hours, until they were eventually freed.
Footage broadcast on local TV showed a small cloud of smoke rising near the tower block, while people climbed out of the windows of one of the lower levels, AFP news agency reported.
Hundreds of civilians were evacuated from the building, the ministry said, but eight people were injured and taken to hospital.