A suicide bomber on a motorcycle targeted a campaign rally by President Ashraf Ghani in northern Afghanistan on Tuesday, killing at least 46 people and wounding 38, officials said.
Ghani was present at the venue but was unharmed, according to his campaign chief.
Just hours later, an explosion struck near the U.S. Embassy in Kabul but details on that blast were not immediately known.
Afghanistan's presidential election is Sept. 28. This coincides with local council votes in Ghazni Province, central Afghanistan.
The Taliban claimed responsibility for two blasts on Tuesday targeted at Afghan security forces. The insurgent group has warned that polling stations and election campaigns would be targeted.
In Tuesday's suicide attack, the bomber rammed his motorcycle packed with explosives into the entrance of the venue where Ghani was campaigning on the outskirts of the city of Charakar in northern Parwan province.
There were many women and children among the casualties, said Dr. Qasim Sangin, a local official.
Wahida Shahkar, spokesperson for Parwan's governor, said the rally had just begun when the explosion occurred.
Firdaus Faramarz, speaking for Kabul's police chief, said there was no immediate information about casualties in the Kabul blast, which took place near Massood Square, a deeply congested intersection in the centre of Kabul. NATO and U.S. compounds are nearby, as are several Afghan government ministries.
Campaigning for the Afghan elections resumed last week after U.S. President Donald Trump declared that the U.S.-Taliban talks that have been going on for months in the Gulf Arab state of Qatar are over.
Most presidential candidates had suspended their campaigns while negotiations were taking place and as the U.S. peace envoy, Zalmay Khalilzad, said a deal was all but signed.
Taliban peace talks 'dead'
Trump's tweets at the beginning of September declaring the deal and the talks were "dead" launched the war-battered nation on an election campaign.
Ghani, who had been sidelined during much of the talks between Khalilzad and the Taliban, resumed campaigning immediately and had been steadfast in his demand that presidential polls should take place.
Khalilzad and some of Ghani's rivals, however had talked of establishing an interim administration to run the country while a peace deal was implemented.
In the aftermath of the scrapped talks, Afghans braced for what many expected to be an increase in violence.
The Taliban have opposed the elections and have refused to meet with representatives of Ghani's government for talks. They have also refused to agree to a cease-fire.
But it was two attacks in Kabul in recent weeks that caused Trump to halt the negotiations with the Taliban, including one that killed two NATO soldiers, one of whom was an American. Another U.S. soldier died in combat in Afghanistan on Monday.
Pakistan condemns attack
Pakistan's Foreign Ministry denounced the attack and offered condolences to the families of the victims as well as prayers for a speedy recovery of the wounded.
A statement by the ministry said "Pakistan condemns terrorism in all its forms," adding Islamabad's support for Afghan efforts aimed at restoring peace and stability to the war-ravaged country.
Kabul often accuses Pakistan of backing the Taliban, who have stepped up attacks across Afghanistan in recent months. Pakistan denies the charge