The Taliban asserted responsibility for the blast. On Twitter, a spokesman for the militant group said that a suicide bomber targeted “a convoy of American occupiers” near the base’s gates.
The attack brings to seven the number of American troops who have been killed this year in Afghanistan.
It takes place as the Trump administration intensifies its effort to facilitate a peace deal with the Taliban. U.S. envoy Zalmay Khalilzad met with President Ashraf Ghani and other Afghan leaders in Kabul in recent days, seeking to build support for nascent discussions with Taliban representatives in Doha, Qatar.
A series of U.S.-Taliban meetings has raised hopes that a political solution might finally be achieved nearly 20 years after U.S. military forces entered Afghanistan in the wake of the Sept. 11, 2001, terrorist attacks. But the initiative has also generated friction between Washington and Ghani’s government, which fears being sidelined in the talks.
President Trump has repeatedly voiced a desire to end the military mission in Afghanistan but has given his diplomats time to seek a political settlement.
Sharif Hassan in Kabul contributed to this report.