Taliban suicide bombers killed at least 48 people and wounded dozens more in two blasts today.

One attack was at a campaign rally for the president and the other in Kabul - with the insurgents warning of more violence ahead of elections.

The first attack saw a motorcyclist detonate a suicide bomb at a checkpoint leading to a rally where President Ashraf Ghani was addressing supporters in central Parwan province, just north of the capital, killing 26 and wounding 42.

Just over an hour later another blast also claimed by the Taliban rocked central Kabul near the US embassy.

Authorities initially did not give casualty figures, but later said 22 people had been killed and a further 38 wounded.

Afghan security forces work at the site of a suicide attack near the US Embassy in Kabul today

A wounded Afghan man is taken out of an ambulance at the Wazir Akbar Khan hospital following a bomb blast in Kabul

Afghan police inspect the site of a suicide attack in northern Parwan province at a checkpoint leading to a rally by President Ashraf Ghani

The explosions came after US President Donald Trump abruptly ended talks with the Taliban earlier this month over a deal that would have allowed the US to begin withdrawing troops from its longest war.

In a statement sent to media claiming responsibility for both blasts, Taliban spokesman Zabihullah Mujahid said the attack near Ghani's rally was deliberately aimed at disrupting the September 28 elections.

'We already warned people not to attend election rallies, if they suffer any losses that is their own responsibility,' the statement said.

An image from the scene near Ghani's rally, roughly an hour's drive north of Kabul, showed the remains of a burnt motorcycle, with a body on top, covered by a blanket and next to a badly damaged police car.

Women and children were among the causalities, Parwan hospital director Abdul Qasim Sangin said.

The president, who was speaking to his supporters at the time of the blast, was unhurt but later condemned the attack, saying the incident proved the Taliban had no real interest in reconciliation.

'As the Taliban continue their crimes, they once again prove that they are not interested in peace and stability in Afghanistan,' said Ghani in a statement.

Afghan security forces remove the remains of bodies from the site of a blast in Kabul

A boy who was injured in a suicide bomb attack that targeted an election campaign rally of incumbent president Ashraf Ghani, receives medical treatment at a hospital, on the outskirts of Kabul

One of the blasts in Afghanistan went off in Kabul while the other was in Parwan province, north of the capital

Sixty kilometres (40 miles) away in Kabul, a shopkeeper, Rahimullah, said he had been sitting inside his shop when the second blast came.

'The wave broke all the windows,' he said.

'I rushed outside and saw several bodies just across the street. This is the second time in less than a month that a blast has broken our windows. I just fixed them a week ago.'

The UN's mission in Afghanistan also slammed the Taliban, accusing them of showing 'despicable disregard for civilian life & fundamental human right to participate in democratic process'.

The elections will see Ghani face off against his own Chief Executive, Abdullah Abdullah, and more than a dozen other candidates, including former warlords, ex-spies, and onetime members of the country's former communist regime.

For weeks, the election had been sidelined by the US-Taliban talks, with many Afghans and observers expecting the vote to be cancelled if a deal was agreed. Even candidates did little in the way of campaigning.

But with the deal off, Ghani and his rivals have begun the race.

Ghani is seeking a clear mandate they can use to negotiate with the insurgents on a lasting peace in Afghanistan.

Hospital workers carrying a wounded man to get treatment after a bomb blast in Kabul today

An Afghan firefighter sprays water on the ground at the site of a suicide attack that targeted a campaign rally for Afghan President Ashraf Ghani in Parwan Province

Trump's declaration that the US-Taliban talks were 'dead' spurred the insurgents to declare last week that the only other option was more fighting.

'We had two ways to end occupation in Afghanistan, one was jihad and fighting, the other was talks and negotiations,' Mujahid said last week.

'If Trump wants to stop talks, we will take the first way and they will soon regret it.'

Observers had warned the Taliban, who hope to weaken the future president, will do anything they can to upend the election.

On the first day of campaigning in July, suicide attackers and gunmen targeted the Kabul office of Ghani's running mate, Amrullah Saleh. At least 20 people died in those attacks.

Turnout in the elections is set to be low, with experts citing fear of violence and a loss of hope among voters following widespread fraud allegations during the 2014 election.

A BBC investigation released on Monday claimed that 74 people were killed every day on average in August, with 611 incidents resulting in 2,307 deaths.