BAGRAM, Afghanistan — A suicide bomber attacked the entrance to the main U.S. military base in Afghanistan on Tuesday during a visit by Vice President Dick Cheney, killing up to 23 people and wounding 20. The Taliban claimed responsibility and said Cheney, who was unharmed, was the target.

The office of Afghan President Hamid Karzai reported that 23 people had been killed, but the U.S. military put the toll at nine. The discrepancy could not be reconciled immediately. At least one U.S. soldier, an American contractor and a South Korean soldier were among the dead, NATO said.

Cheney’s spokeswoman said he was fine, and the vice president later met with Karzai in the capital, Kabul, before leaving the country.

‘I heard a loud boom’
On the flight out of Afghanistan, Cheney told reporters that he had been in his room at the U.S. base where he had stayed the night unexpectedly after bad weather forced postponement of his trip to the Afghan capital, about 40 miles away.

“At 10 a.m. I heard a loud boom,” Cheney said.

A red alert was sounded and Secret Service officials told Cheney there had been a suspected suicide attack. “They moved me for a relatively brief period of time to one of the bomb shelters nearby,” he said.

“As the situation settled down and they got a better sense in terms of what was going on, then I went back to my room until it was time to leave.”

Asked if he had ever considered changing his plans to go to Kabul, Cheney said that was “never an option.”

“They clearly try to find ways to question the authority of the central government,” Cheney said of Taliban insurgents. “Striking at Bagram with a suicide bomber I suppose is one way to do that.”

Conflicting reports
Associated Press reporters at the scene said they had seen the bodies of at least 12 people carried in black body bags and wooden coffins from near the base into a market area where hundreds of Afghans had gathered to mourn.

Maj. William Mitchell said it did not appear the explosion was intended as a threat to the vice president. “He wasn’t near the site of the explosion,” Mitchell said. “He was safely within the base at the time of the explosion.”

Taliban: Cheney was the targetHowever, a purported Taliban spokesman, Qari Yousef Ahmadi, said Cheney was the target.

Ahmadi said the attack was carried out by an Afghan called Mullah Abdul Rahim.

The explosion happened near the first of at least three gated checkpoints that vehicles must pass through before gaining access to the Bagram Air Base.

The sprawling base houses 5,100 U.S. troops and 4,000 other coalition forces and contractors. High security areas within the base are blocked by their own checkpoints. It was unclear how an attacker could expect to penetrate the base, locate the vice president and get close to him without detection.

“We maintain a high-level of security here at all times. Our security measures were in place and the killer never had access to the base,” said Lt. Col. James Bonner, the base operations commander. “When he realized he would not be able to get onto the base he attacked the local population.”

It was not the first attack apparently aimed at a top U.S. official in Afghanistan. In January 2006, a militant blew himself up in Uruzgan province during a supposedly secret visit by the U.S. ambassador, killing 10 Afghans.

‘Huge’ blast describedKhan Shirin, a private security guard, sobbed near the dead body of his relative, a truck driver and the representative of transport association that hauls goods for the U.S. base. Shirin said many of the people killed were truck drivers waiting to get inside the base.

Ajmall, a shopkeeper, said the “huge” blast shook a small market where he has a stall about 500 yards from the Bagram base. Ajmall, who goes by one name, said those wounded in the blast were taken inside the U.S. base for treatment.

Video: Terror expert
One of the dozen U.S. soldiers standing guard near the blast site said that most bodies had been returned to their families, and that some may have died of their wounds at the military hospital.

“It’s a bad, bad day,” said the soldier, who declined to give his name.

South Korea’s Defense Ministry said one of its soldiers stationed in Bagram, Sgt. Yoon Jang-ho, 27, was killed in the explosion. South Korea has about 200 engineers and medics in Bagram.

Cheney, who spent the night at Bagram, left the base about two hours after the blast. The explosion sent up a plume of smoke visible by reporters inside the base traveling with Cheney.

Earlier, Cheney ate with soldiers, telling reporters that “breakfast was excellent” but making no other comments while at the base.

Talks focus on resurgent TalibanIn Kabul, Cheney was met by guards with guns drawn on the tarmac and was rushed by ground convoy to the presidential palace, where he and Karzai walked a long receiving line and past oriental rugs laid out on the wet, stone pavement.

Cheney and Karzai met privately for an hour and spoke about the “problems coming from Pakistan,” said an Afghan government official, a reference to cross-border infiltration by militants who launch attacks in Afghanistan.

“We understand now that the U.S. government realizes that in order to stop terrorism in Afghanistan and to stop terrorist attacks in Afghanistan, there must be a clear fight against terrorism in Pakistan,” said the official, who spoke on condition of anonymity because of the sensitivity of the matter.

Five years after their fundamentalist regime was toppled, Taliban-led militants have stepped up attacks and Afghan, U.S. and NATO forces are bracing for a fresh wave of violence in the spring.

There were 139 suicide bombings last year, a five-fold increase over 2005, and officials Maj. expect the number of suicide bombs to rise in 2007.

Al-Qaida believed to regroup
Cheney's visit came as Washington said al-Qaida and its Taliban allies were regrouping on Pakistan and Afghan soil.