Bomb explodes near a school in western Afghanistan

At least 21 people are injured, including 10 students as young as 7 years old.

The attack comes two days after the U.S. began withdrawing the remaining 2,500 to 3,500 troops from Afghanistan, following President Joe Biden's plan to be out of the country by Sept. 11 at the latest.

In the last two days there have been almost 300 Taliban attacks in more than two dozen provinces across Afghanistan, according to the Afghan Ministry of Defense.

Former defense minister Tamin Asey told ABC News that the Taliban have not changed, as many fear the group's violent resurgence amid troop withdrawal.

"The ideology haven't changed. Their global claim to jihad haven't changed. They are more confident of their victory and they think that they have defeated the United States and NATO," Asey said.

Top U.S. military officer General Austin Miller, the commander of U.S. and NATO forces, warned the Taliban that they'll respond forcefully to any type of attack, according to the Associated Press.