US Secretary of State Mike Pompeo. (AP)

WASHINGTON: US Secretary of State Mike Pompeo has condemned the terrorist attacks carried out by the Taliban suicide bombers in Afghanistan in which at least 48 people were killed.

In Parwan province, to the north of Kabul , a Taliban suicide bomber on Tuesday targeted an election campaign rally where Afghanistan President Ashraf Ghani was set to speak, killing 26 people and wounding 42.

Ghani was not hurt in the attack which happened at a checkpoint near the rally venue, a spokesperson for the governor of Parwan confirmed.

In a separate incident hours later, a suicide bomb attack near the US embassy in central Kabul killed 22 people.

"Through these attacks, the Taliban demonstrate blatant disregard for the people and institutions of Afghanistan," Pompeo said in a statement after the Taliban claimed responsibility for both the terrorist attacks.

He said for Afghans to truly reconcile, the Taliban must begin to demonstrate a genuine commitment to peace rather than continue the violence and destruction that causes inordinate harm to the Afghan people and the future of their country.

"And for days, Afghanistan has endured blackouts and other challenges as a result of Taliban attacks against power transmission lines which carried electricity to hospitals, schools, and homes in many areas of the country," Pompeo said on Tuesday.

The attacks came after US President Donald Trump stunned the world on Saturday when he announced the cancellation of a secret meeting with the Taliban and Afghan President Ghani at Camp David near Washington.

Trump's announcement came after the Taliban claimed responsibility of an attack in Kabul last week, in which an American soldier was among the dead.

"They (the Taliban) thought that (they) had to kill people in order to put themselves in a little better negotiating position.... You can't do that with me," Trump said while responding to a question about his decision to cancel the talks.

Trump said the decision to invite the Taliban to Camp David was his, and so was the call to cancel it.

Justifying the move, the president underlined that he did not want the meeting to happen under circumstances "where they (Taliban) go around and try and make themselves a little bit more important by killing a soldier and also a total of 12 people".

