A suicide bomber dressed in a police uniform struck outside the gates of a police academy in Kabul on Friday evening, killing at least 20 recruits and wounding 25, Afghan officials said, the second massive attack of the day in the Afghanistan capital.
The attacker walked into a group of recruits waiting outside the academy and detonated his explosives-laden vest, said a police officer, who goes by the name of Mabibullha. Many Afghans use only one name.
Another police officer, who spoke on condition of anonymity because he was not authorised to talk to reporters, said there were also at least 25 wounded among the recruits.
The Taliban claimed responsibility for the attack on Twitter.
Earlier in the day, a massive truck bomb killed at least 15 people near a government complex and a military base in a residential area of Kabul.
That blast hit at 1 am and also wounded 240, officials said. It was one of the largest ever in Kabul a city of 4.5 million people in terms of scale, flattening a city block and leaving a 30-foot crater in the ground.
The president's office said 47 women and 33 children were among the casualties. The president's deputy spokesperson Zafar Hashemi said about 40 of the wounded were hospitalised.
President Ashraf Ghani threatened a rapid and forceful response, saying the attack was aimed at diverting public attention from the Taliban's leadership struggle but that it would not sway his determination to carry on with efforts to bring peace to the country.
"We are still committed to peace. But we will respond to these sort of terrorist attacks with force and power," Ghani said in a statement.
The Afghan intelligence agency announced over a week ago that Mullah Mohammad Omar, the reclusive one-eyed founder and leader of the Taliban, had been dead for more than two years.
This sparked a leadership struggle among senior Taliban figures, raising concerns of a succession crisis that could splinter the group.
The implications of the Kabul attacks undermine claims by security services and the government that the capital is immune from devastating attacks.
There was no immediate claim of responsibility for the earlier attack as well. The Taliban said they were not behind the explosion, though the group does not usually claim responsibility for attacks that kill or maim large numbers of civilians, especially women and children.
Ghani, freshly returned from medical treatment in Germany, visited the wounded from the earlier morning attack in hospital as social media carried calls for blood donations.