The explosion struck at dawn inside the heavily fortified Bagram Airfield north of Kabul, as the Taliban step up attacks on Western targets before the onset of winter, when fighting usually ebbs.
The nationalities of those killed were not immediately known after the blast, which highlights a worsening security situation nearly two years after NATO formally ended its combat operations in Afghanistan.
"An explosive device was detonated on Bagram Airfield resulting in multiple casualties. Four people have died in the attack and approximately 14 have been wounded," NATO said in a statement.
Waheed Sediqi, spokesman for the governor of Parwan province where Bagram is located, said the blast was caused by a suicide attacker who blew himself up near a dining facility inside the base.
More From This Section
"We don't know the identity of victims yet, but the attacker was either one of the Afghan labourers working there," Sediqi told AFP.
Bagram district governor Abdul Shakoor Quddusi said the explosion that struck around 0100 GMT was powerful and reverberated across the area.
"To the family and friends of those who lost their lives today, we share your loss and our thoughts are with you. We offer you our deepest condolences," said John Nicholson, the top US and NATO commander in Afghanistan.
Taliban spokesman Zabihullah Mujahid said the insurgent group was behind the suicide attack inside Bagram, claiming it inflicted "heavy casualties on US invaders".
The brazen attack represents an alarming security breach inside what is regarded as one of the most heavily guarded military installations in Afghanistan.
Bagram Airfield, close to Kabul, has frequently come under attack by Taliban insurgents.
Last December, a motorcycle-riding Taliban suicide bomber killed six US soldiers near Afghanistan's largest US military base. It was one of the deadliest attacks on foreign troops in the country in 2015.
The uptick in attacks comes just days after a bitter US presidential election.