A Taliban suicide bomber dressed as a labourer blew himself up at the NATO air base at Bagram north of the Afghan capital Kabul on Saturday, killing at least four people and wounding 18, officials said.

“An explosive device was detonated on Bagram Airfield resulting in multiple casualties,” the Nato-led Resolute Support mission said in a statement.

“Response teams at Bagram continue to treat the wounded and investigate the incident,” the statement said.

Waheed Sediqqi, spokesman for the Parwan provincial governor, said the bomber managed to enter the heavily protected site, the largest US base in Afghanistan, and was standing in a queue with Afghan labourers when he detonated a suicide vest.

Sediqqi said four people were killed and 18 wounded. There was no immediate word on the identity of the victims.

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.

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.

“For the family and friends of those wounded in today's attack, let me assure you they are receiving the best care possible, and we will keep them in our thoughts today.” 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 latest attack comes after a powerful Taliban truck bomb struck the German consulate in Afghanistan's northern Mazar-i-Sharif city late Thursday, killing at least six people and wounding more than 100 others. The uptick in attacks comes just days after a bitter US presidential election.

Afghanistan got scarcely a passing mention in the election campaign ─ even though the situation there will be an urgent matter for the new president.

President-elect Donald Trump is set to inherit America's longest war with no end in sight.