Afghan officials said at least 13 militants died in the attack, including six suicide bombers. NATO offered a slightly different account, saying three suicide bombers detonated their vests and three more were shot dead. NATO said seven attackers in total were killed.
The militants failed to gain entry to Camp Salerno in Khost city after launching waves of attacks just before midnight on Monday, said Arsallah Jamal, the governor of Khost. The base is just a few miles away from Pakistan's border.
The attack came one day after a suicide bomber outside the same base killed 10 civilians and wounded 13 others.
Soldiers on the ground, fighter aircraft and helicopters were chasing the retreating militants. NATO said its forces identified the attackers about 1,000 yards outside of the base perimeter and launched helicopter gunships.
Gen. Mohammad Zahir Azimi, the Afghan Defense Ministry spokesman, said Afghan soldiers, aided by U.S. troops, chased and surrounded a group of insurgents, and six militants in suicide vests blew themselves up when cornered. Seven other militants died in those explosions and a rolling gun battle, he said.
"(The Afghan National Army) is saying that anytime we get close to them, they detonate themselves," Jamal said.
The Taliban appeared to confirm that account. Zabiullah Mujahid, a Taliban spokesman, said the militants dispatched 15 militants for the attack on Salerno, and seven blew themselves up and eight returned to a Taliban safe-house.
Jamal said the bodies of at least two dead militants were outside the checkpoint leading to the base's airport, both of whom had suicide vests on. It wasn't clear if those militants were among the dead in Azimi's count.
Two Afghan civilians also died in the fighting, Jamal said.
Militants have long targeted U.S. bases with suicide bombers, but coordinated attacks on such a major base are rare.
In related developments: