KABUL, Afghanistan - A suicide attacker exploded a bomb Wednesday near the main gate of an American base outside the eastern city of Khost, killing seven civilian laborers and wounding 21, a day after a coordinated Taliban attack inside the town left at least nine dead, provincial officials said.
Wednesday's attack happened as Afghan laborers working at the base were lining up for security checks to enter the base, said Kochai Nasiri, spokesman for the governor of Khost Province.
All the victims were civilians and daily workers at Camp Salerno, one of the largest American bases in Afghanistan. The entrance to the camp has been the target of repeated suicide bombings, killing dozens of laborers over the past several years. A spokesman for the American military confirmed the attack and said there were no casualties among American soldiers.
Wednesday's bombing followed a Taliban strike by waves of suicide bombers against government buildings in the neighboring city of Khost. At least nine died after a daylong hostage siege and a gun battle with American forces, Afghan officials said.
The assault Tuesday, which included a bombing outside the provincial governor's office, was one of a number of increasingly audacious attacks that seemed intended to underscore the vulnerability of the government by hitting its buildings directly.
It was also part of an intensified campaign by the Taliban before the arrival of more than 20,000 new American forces, and it came a day after President Obama replaced the commander of forces in Afghanistan, hoping to place more emphasis on counterinsurgency operations.
On Tuesday, the insurgents employed a method that has by now become a Taliban signature: waves of attackers using suicide vests, car bombs and other weapons to storm buildings and take hostages, fighting until they blow themselves up or are killed.
The attacks in Khost city, the provincial capital, came so quickly and sowed such chaos that even late in the day Afghan and American officials gave contradictory accounts of the sequence of events and the numbers of people killed.
The Interior Ministry said the assaults began about 10 a.m., when a suicide car bomb exploded at the gate of the governor's office, killing two policemen and two other guards. The militants apparently tried to enter the building and were fought back.
Shortly afterward, the ministry said, a group of nine suicide attackers stormed a nearby municipal building. Four blew themselves up in a battle with security guards, while 5 others made their way into the building and took about 20 people hostage. The attackers were eventually killed at the end of a long standoff, it said.
Wazir Padshah, a spokesman for the provincial police chief, said 20 hostages had been freed. But he gave a slightly different version of events, saying the militants had first attacked the municipal building, followed by the governor's office 10 minutes later. The Taliban also attacked a police station but were rebuffed, he said.
Mr. Padshah said 11 attackers had been involved in the assaults in all, each armed with a suicide vest and an AK-47 assault rifle. At least one was disguised in a burqa, the head-to-toe women's garment, while most of the others wore Afghan Army uniforms, he said.
Such elaborate attacks have become increasingly common in recent months. Taliban suicide bombers and gunmen killed 20 people after storming government buildings at three sites, including the Justice Ministry in Kabul, the national capital, in February.
In March, militants stormed a municipal building housing a police headquarters and a court in the southern city of Kandahar, killing at least eight people.
At the time of Tuesday's attack, American troops based at Camp Salerno were meeting with Afghan Army and Afghan national police officials a few blocks away, said Chief Petty Officer Brian Naranjo, a spokesman for American forces in Afghanistan.
Hearing an explosion, they rushed to the scene, coming under fire by the militants. They killed two suicide bombers before they could detonate themselves, Chief Naranjo said.
Gun battles with the militants in and around the municipal building lasted for at least seven hours, Afghan officials said. Initial death tolls varied, with local health officials saying at least eight had been killed - four civilians and four security officers.
Mr. Padshah, the provincial police official, put the death toll at 9, and some news reports put the tally as high as 20.
Dr. Hamid Padshah, the public health director of Khost Province, said in a telephone interview that the local hospital had received nine bodies, including four policemen, four civilians and one suicide attacker.
There were also 20 wounded, including 18 civilians and 2 policemen, he said.
Chief Naranjo said 6 civilians and 6 militants had been killed, and 24 people wounded, including 3 American soldiers.
The governor, Hamidullah Qalanderzay, was in his office at the time of the attack but was not injured, said a member of his security detail.
A Taliban spokesman, Zabihullah Mujahid, said that the attack included 30 fighters in all and that 8 had died in the operation. The Taliban had intended to attack the meeting between the American military and the Afghan officials, which they believed was being held in the governor's office, he said.
Abdul Waheed Wafa reported from Kabul, and Sharon Otterman from New York. Taimoor Shah contributed reporting from Kabul.