Steph Solis

USA TODAY

A day after a suicide bombing at a U.S. military base in Afghanistan killed four Americans, the U.S. Embassy in Kabul announced it would shut down "as a temporary precautionary measure," the Associated Press reported.

The embassy said in a statement it was closing for "routine services" the day following the suicide attack on the Bagram Airfield, a U.S. base near the capital. The attack claimed the lives of two soldiers and two contractors and left at least 17 injured, the AP reported.

In a statement on the embassy's Facebook page, Sec. of State John Kerry said, "Our mission in Afghanistan will not be deterred by these individual acts, it's that simple. The sooner people realize there's a better way to resolve differences, the sooner the world will be able to move more effectively in a better direction."

Carter: Apparent suicide bomber kills 4, injures 17 at U.S. base in Afghanistan

The Taliban claimed responsibility for the blast, according to a spokesman on Twitter. The extremist group said it was "revenge attack" for recent U.S. airstrikes in the region. The spokesman, Zabihullah Mujahid, said the attack had been planned for four months.

The German Consulate in the northern city of Mazar-i-Sharif was targeted two days earlier, as insurgents killed six people and wounded more than 100.

The Bagram Airfield attack also comes days after the election of Donald Trump as president, which extremists celebrated.

"Rejoice with support from Allah, and find glad tidings in the imminent demise of America at the hands of Trump,” said the al-Minbar Jihadi Media network, which is affiliated with the Islamic State, according to the U.S.-based SITE Intelligence Group.

"Trump’s win of the American presidency will bring hostility of Muslims against America as a result of his reckless actions, which show the overt and hidden hatred against them,” the al- Minbar Jihadi Media network continued.

A U.S. travel warning remains in place for Afghanistan, where the Taliban-led insurgency continues for the 16th year, the AP reported.

Contributing: Charles Ventura and Jane Onyanga-Omara, USA TODAY.