KABUL, Afghanistan — The death toll from an attack against the office of the Afghan president's running mate in Kabul has climbed to at least 20 people, an official said Monday.

Nasrat Rahimi, a spokesman for the Interior Ministry, said about 50 other people were wounded in the attack against the Green Trend party headquarters on Sunday, which lasted for hours and included a gunbattle between security forces and attackers who were holed up in the building.

Security forces killed several gunmen, Rahimi said.

The attackers' potential target, vice presidential candidate Amrullah Saleh, the former chief of Afghanistan's intelligence service, was "evacuated from the building and moved to a safe location," Rahimi said. Eighty-five other civilians were also rescued.

No one immediately claimed responsibility for the attack, but both Taliban and Islamic State insurgents are active in the capital and have carried out attacks in the past.

Sunday marked the first day of the Afghan presidential campaign, with a vote scheduled for the end of September.

After the attack, President Ashraf Ghani tweeted that Saleh was unharmed during the "complex attack" targeting the Green Trend office.

Ferdous Faramarz, the spokesman for Kabul's police chief, said the attack was started by a suicide car bomber, after which other attackers entered into a building and start shooting at security forces.

The blast was large enough to be heard throughout the capital.