KABUL, Afghanistan -- Hundreds of heavily armed Taliban insurgents attacked army checkpoints in eastern Afghanistan on Sunday, officials said, killing 21 soldiers in the deadliest single incident for the Afghan army in at least a year.
In response to the assault -- which also left several Afghan soldiers missing -- President Hamid Karzai postponed a planned trip to Sri Lanka.
Gen. Mohammad Zahir Azimi, who is spokesman for the Defense Ministry, said "hundreds" of foreign and Afghan insurgents crossed the border to mount the attack, which took place in the remote and mountainous Ghazi Abad district of Kunar Province in the early morning hours.
Azimi did not specify which border, but Kunar lies next to Pakistan. It's a militant stronghold, and many Arab and other foreign insurgents are believed to operate there alongside the Afghan Taliban.
The Taliban claimed responsibility for Sunday's attack in an emailed statement, saying that one of their insurgents was killed and two were wounded.
The group has escalated attacks in recent months as it tries to take advantage of the withdrawal of foreign troops at the end of 2014. Casualties among Afghan troops have been rising significantly since they took the lead in the war against the Taliban. Since the beginning of 2014, 84 Afghan army soldiers have been killed.
Azimi said that 21 Afghan soldiers died and three others were wounded in the attack, which turned into an intense, four-hour gunbattle between the army and insurgents.
An army support unit en route to assist the operation also was targeted by a suicide bomber, he said, but there were no military casualties.
Gen. Abdul Habib Sayedkhaili -- chief of police for Kunar Province -- said that there were around 30 Afghan soldiers manning the outpost when insurgents attacked from three sides with rocket-propelled grenades, mortars and light weapons.
He said that of seven soldiers initially reported missing, three had been found alive and security forces continued to searching for the others.
It was not immediately clear if the soldiers had been kidnapped or had fled during the assault.
Hours after the attack, security forces were continuing to trade fire with the insurgents and chase them through difficult terrain, Saeydkhaili said.
"Our security forces are going as far as they can to chase the enemy," he added.
While neither Azimi nor Sayedkhaili specifically mentioned Pakistan, the Afghan president appeared to point a finger at the neighboring nation.
In a statement condemning the attack, Karzai called on Pakistan to take serious measures to destroy terrorist sanctuaries and fight against terrorism.
Pakistan has a complicated relationship with the Taliban. It helped the group seize control of Afghanistan in 1996, and Kabul has repeatedly accused Islamabad of providing the insurgents sanctuary on its territory following the U.S.-led invasion of Afghanistan in 2001.
-- Associated Press writer Cassandra Vinograd contributed to this report.