Kabul, Afghanistan: Afghan officials say a sticky bomb attached to a police vehicle went off near a campaign rally by President Ashraf Ghani in the country's northern Parwan province.

A hospital director in northern Afghanistan says a bombing that targeted a campaign rally of President Ashraf Ghani killed 24 people. The president was at the scene but was unharmed in the blast and is safe.

Dr. Qasim Sangin at the Charakar hospital in northern Parwan province says another 31 people were wounded in the attack. He says there are women and children among those killed and wounded.

No one claimed responsibility for the attack, which comes as the country heads into presidential elections later this month despite relentless violence plaguing Afghanistan.

The Taliban have warned Afghans not to vote and said they would target polling stations and election campaigns.

The president's campaign spokesman Hamed Aziz says that Ghani was there but that he is safe and unharmed. Aziz said he would provide more details later.

Wahida Shahkar, spokeswoman for the provincial governor in Parwan, says the explosion happened while the rally was underway on Tuesday, at the entrance to the venue.