KABUL, March 25 (Reuters) - Suicide bombers attacked a building next to the house of Afghan presidential candidate Ashraf Ghani and engaged in a gun battle with security guards protecting his home, officials said.

More than an hour after the initial explosions, gunfire could still be heard in the area, which had been cordoned off by police, a Reuters cameraman at the scene said.

Ghani, a former World Bank official, was not at home at the time of the attack.

The Afghan capital is on high alert ahead of an April 5 presidential election which Taliban insurgents have threatened to derail through a campaign of bombings and assassinations.

The election is designed to mark the country's first democratic transfer of power. President Hamid Karzai is barred from running for another term after 12 years in power but is widely expected to retain his influence after the vote.

The Taliban claimed responsibility for the attack.

Initially police said militants had attacked Ghani's house itself but later Ghani's campaign aide said the assault started from an adjacent building housing a provincial election office.

"The attack was on an election office next to Dr Ashraf Ghani's house. His house was also hit by the attackers. He is not at home but his family is there," said the aide.

The interior ministry said there were two explosions followed by gunfire. There were no immediate reports of casualties.

Ghani, in Twitter post sent after the attack, said: "Just arrived at Gardez rally, a huge crowd of tens of thousands." Gardez is in a volatile area south of Kabul.

The Taliban said in a statement their suicide bombers had entered the adjacent building and blew themselves up.

"A number of suicide bombers attacked an important election centre at the heart of Kabul," the statement said.

"The attack started with a very heavy explosion and then a number of people entered with heavy and light weapons."

Separately on Tuesday, three suicide bombers entered a branch of Kabulbank, one of Afghanistan's biggest banks, in eastern Kunar province killing at least three security guards and wounding two bank workers, police said. (Additional reporting by Mirwais Harooni; Writing by Maria Golovnina; Editing by Jeremy Laurence)