KABUL, Afghanistan — A suicide bomber apparently posing as a laborer killed four Americans and wounded 16 others Saturday morning at Bagram Air Base in northern Afghanistan, U.S. and Afghan officials said.

A Polish soldier participating in the NATO mission was also among the wounded.

The Taliban claimed responsibility.

Afghan officials said the bomber was wearing the kind of clothing normally worn by local laborers, who line up at dawn to enter the base.

Two American service members and two contractors working on the base were killed in the explosion, U.S. Defense Secretary Ashton Carter said.

“I want to express my sincere condolences to the families of the fallen, and I want to reassure the loved ones of those injured that they are getting the best possible care,” Carter said in a statement. “Force protection is always a top priority for us in Afghanistan, and we will investigate this tragedy to determine any steps we can take to improve it.”

“For those who carried out this attack, my message is simple,” he continued. “We will not be deterred in our mission to protect our homeland and help Afghanistan secure its own future.”

Bagram Air Base, north of Kabul, is a military installation where U.S. fighter jets, drones and thousands of military personnel and contractors are based in the ongoing fight against a resurgent Taliban.

The U.S. has 9,800 troops in the country advising Afghan forces, but President Barack Obama announced that the number will drop to 8,400 by the year’s end.

The Afghan military has struggled to defend the country against increased Taliban attacks, despite support by U.S. special forces advisers and daily airstrikes by U.S. warplanes. On Friday, for example, Taliban fighters killed six people when a suicide car bomber attacked the German consulate in the northern city of Mazar-i-Sharif.

The militants have launched suicide bombings and other attacks elsewhere around the country, more than 15 years after the U.S.-led military invasion.

Although the U.S. has maintained an advisory and backup role, conducting airstrikes and providing training and financial support to proxy ground forces, 11 U.S. service members have been killed this year.

Afghan forces are on track to surpass the 20,000 total in casualties sustained last year, including nearly 5,000 dead.

Although the Afghan government continues to control city centers, the Taliban holds rural areas and has more territory now than at any time since the war began in 2001, according to United Nations estimates.