Image copyright Reuters Image caption President Ashraf Ghani at an earlier election rally

Two separate suicide attacks in Afghanistan have killed at least 48 people and injured dozens others.

In Parwan province, north of the capital Kabul, an election rally where President Ashraf Ghani was due to speak was attacked, and 26 people died.

Another blast, near the US embassy in central Kabul, killed 22 people.

The Taliban said they were behind both attacks. The group has continued a concerted bombing campaign while at the same time taking part in peace talks.

But US President Donald Trump described the negotiations with the Taliban as "dead" earlier this month.

The Taliban refuse to talk to the Afghan government and have vowed to disrupt the presidential election in the country on 28 September.

In a statement, they said: "We already warned people not to attend election rallies, if they suffer any losses that is their own responsibility."

What is known about the explosions?

Forty-two people are reported to have been injured in the election rally blast in Charikar, the capital of Parwan province, at 11:40 local time (07:10 GMT).

Children were among the casualties, medical staff said. The bomber, on a motorbike, triggered the blast at a checkpoint at the venue.

President Ghani, who hopes for a second five-year term, was not hurt.

Another suicide bomber targeted Kabul's busy Massood Square, the site of government ministries and Nato compounds, at 13:00 local time.

An additional 38 people were injured there, according to the Ministry of Interior Affairs.

On Twitter, the president called the perpetrator "a cowardly enemy".

Skip Twitter post by @ashrafghani Kabul was also hit by coward enemy and again the target was civilian lives. I offer my heartfelt condolences to victims of today's tragedies in Kabul and Parwan and pray for speedy recovery of those who were wounded. We stand united in this hour of grief. — Ashraf Ghani (@ashrafghani) September 17, 2019 Report

What is the security situation in Afghanistan?

An average of 74 people were killed every day in the country in August, according to data collected by the BBC.

Most of the casualties were those involved in combat, such as Taliban fighters, but a fifth were civilians, including children.

Media playback is unsupported on your device Media caption The BBC was given exclusive access to spend a week with ambulance workers in Afghanistan

The worst day for civilians was 18 August, when 112 were killed, including 92 at a wedding in Kabul.

The Taliban are estimated to be openly active across 70% of Afghanistan.

In June 2019, the country was named the least peaceful place in the world by the Global Peace Index report.

Both Taliban and Nato-backed Afghan forces are on the offensive now.

One Afghan government source said they were fighting harder than ever before as they pushed to recapture territory long held or recently taken by the Taliban.

More fighting means more civilian casualties.

Taliban negotiators in the Qatari capital Doha told us they had established an office to investigate such incidents.

On the government side, an office was set up six months ago by the national security adviser, Dr Hamdullah Mohib, who told us every incident was being investigated.

But as one village elder in Herat lamented: "We're coming under attack from both sides. What should we do?"

What happened to the peace talks?

President Trump called off peace negotiations with the Taliban on 7 September after the militant group launched an attack that killed an American soldier.

Talks on ending the 18-year conflict had been under way for weeks in the Gulf state Qatar, and were, by some accounts, coming close to fruition.

The US has had troops in Afghanistan since 2001, when it overthrew the Taliban government.

Since then, the Taliban have refused to speak directly with the Afghan government, calling it an American puppet.

At the weekend, a spokesman for President Ghani ruled out making any deal before the election.

Why are the elections contentious?

The elections have been twice delayed, and if the peace deal had been struck, they were unlikely to go ahead this month.

The Taliban fear they will allow the current government to cement its power. They have attacked campaign rallies and polling sites in previous years.

The group's spokesman, Zabihullah Mujahid, said such locations were "military targets" because they were protected by security forces.