At least seven people have been killed and seven others wounded after a suicide attack near a Shia mosque in the Afghan capital, Kabul, officials said.

"In the explosion, seven were martyred and seven were wounded," Najib Danish, the interior ministry spokesman, wrote on Facebook after the attack on Friday.

According to Nasrat Rahimi, deputy spokesman for the interior minister, a suicide bomber blew himself up while trying to enter a gathering commemorating the anniversary of the death of Abdul Ali Mazari, a former leader of the mainly Shia Hazara community. Mazari was killed by the Taliban in 1995.

The local TOLO news said the explosion occurred close to Mosalla-e-Mazari area in Kabul's sixth district.

There was no immediate claim of responsibility, but Kabul has seen a spate of deadly attacks carried out by both the Taliban and the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) in recent months.

In January, a Taliban attacker drove an ambulance filled with explosives into the heart of Kabul, killing at least 103 people and wounding as many as 235. A day later, at least 11 soldiers were killed when gunmen attacked a military academy, also in Kabul.

In December, dozens of people were killed in a suicide attack on a Shia cultural centre, claimed by ISIL.

Two months earlier, two, separate mosque attacks had killed at least 72 people.

Friday's attack came less than two weeks after President Ashraf Ghani called on the Taliban to join peace talks, to end more than 16 years of the latest phase of Afghan war.

'16 killed in separate attack'

Also on Friday, at least 16 security force members were killed after Taliban fighters attacked their posts overnight in Khwaja Ghar district in Takhar province, according to officials cited by TOLO.

Abdullah Abdullah, chief executive, said "10 army soldiers and six police force members were martyred in Takhar."

The Taliban claimed responsibility for the attack in a statement.