* Attack comes after months of relative calm in Afghan capital
* Explosion appeared to be caused by suicide bomber - officials
* At least three attackers killed - Interior Ministry spokesman
* Taliban denies responsibility for the attack (Updates death toll, adds details)
By Abdul Qadir Sediqi and Rupam Jain
KABUL, April 20 (Reuters) - At least seven people were killed in an attack on the Afghan communications ministry in central Kabul on Saturday, breaking months of relative calm in the capital and underlining the continued security threats despite efforts to open peace talks with the Taliban.
The attack began shortly before midday when a suicide bomb was detonated at the entrance to the multi-story building housing the ministry in a busy commercial area of the city, followed up by gunfire which could be heard over a mile away.
Among the dead were four civilians and three police officers, while another eight civilians were wounded, a government official said.
"We saw a gunman trying to break open an office door and as we were running out, he was trying to shoot us and he started shouting 'I will kill everyone here'," said Syeda Rashid, an office administrator in the ministry who escaped with several of her colleagues. She said at least six women had been wounded.
Television images showed people fleeing after gunfire and explosions began near the 18-story government tower.
The area around the building was sealed off by police as at least three attackers battled security forces for several hours before the attack was finally suppressed in the late afternoon, Interior Ministry spokesman Nasrat Rahimi said.
The interior ministry said in a statement that more than 2,800 employees of the Ministry of Communications and Information Technology and the Ministry of Information and Culture were evacuated during the clearance operation.
Several young children and staff at a childcare center for ministry employees were also evacuated.
"We were having lunch when we heard the explosion," said Rabia, who worked at the childcare center. "We grabbed the children together into the safe room and just waited till the security forces arrived," she said.
The blast, which security officials said appeared to have been caused by a suicide bomber, was also close to the heavily fortified Serena Hotel, one of the very few Kabul hotels still used by foreign visitors.
The operation marked a return to the kind of complex attacks in an urban center that have killed hundreds of people in Kabul and other Afghan cities over recent years.
There was no claim of responsibility but the Taliban issued a statement denying any involvement. Many such attacks have been claimed by the radical Islamic State group.
Prior to Saturday's attack, Kabul had been relatively calm as U.S. officials have held a series of meetings with representatives from the Taliban to try to agree the basis for a peace settlement and an end to more than 17 years of war.
While heavy fighting has carried on across Afghanistan and Taliban militants have announced their now customary spring offensive, it had been months since the last major attack on civilian targets in the capital.
The attack, just days after a planned meeting between Taliban officials and Afghan politicians and civil society representatives in Qatar was canceled, underlined the hurdles facing efforts to reach a peace settlement.
Officials have said they hope to hold a meeting soon but no date has been set. (Reporting by Abdul Qadir Sediqi, Rupam Jain, James Mackenzie, Zuhra Orooj, Akram Walizada; Editing by Nick Macfie, Kenneth Maxwell and Alison Williams)