KABUL, May 2 (Reuters) - Suicide bombers attacked a compoundhousing Westerners in Kabul on Wednesday hours after U.S.President Barack Obama signed a security pact during a shortvisit to a city that remains vulnerable to a resilientinsurgency.

The Taliban claimed responsibility for the attack whichinvolved a car bomb and insurgents disguised as women on theeastern outskirts of the capital, killing seven people, a Gurkhaguard and six passers-by, and wounding 17.

The Taliban said it was in response to Obama's visit and tothe strategic partnership deal he signed with Afghan PresidentHamid Karzai, a pact that sets out a long-term U.S. role aftermost foreign combat troops leave by the end of 2014.

The insurgency also claimed their spring offensive, whichbegan two weeks ago with attacks in Kabul, would be renewed onThursday, despite a security clamp-down in the capital.

Obama's visit came a year after U.S. special forces troopskilled al Qaeda leader Osama bin Laden, the architect of theSept. 11, 2001, attacks, in a raid in neighbouring Pakistan.

In a televised address to the American people from a basenorth of Kabul, he said the war in Afghanistan was winding down.

"As we emerge from a decade of conflict abroad and economiccrisis at home, it's time to renew America," Obama said,speaking against a backdrop of armoured vehicles and a U.S.flag.

"This time of war began in Afghanistan, and this is where itwill end."

Nearly 3,000 U.S. and NATO soldiers have been killed inAfghanistan since the Taliban rulers were ousted in 2001.

The Taliban, overthrown by U.S.-backed Afghan forces forharbouring bin Laden and other militants, were quick to takecredit for Wednesday's attack at Green Village, one of severalcompounds for Westerners on a main road out of the capital.

"This attack was to make clear our reaction to Obama's tripto Afghanistan. The message was that instead of signing astrategic partnership deal with Afghanistan, he should thinkabout taking his troops out from Afghanistan and leave it toAfghans to rebuild their country," Taliban spokesman ZabihullahMujahid told Reuters by telephone from an undisclosed location.

But America's Kabul ambassador, Ryan Crocker, saidinvolvement of the Haqqani network - which Washington believesis based in Pakistan's North Waziristan region and which itblames for high-profile attacks in Kabul in April - could not beruled out.

On the anniversary of bin Laden's killing, Crocker said hedid not believe there would be a sole turning point in the war.

"Al Qaeda is still there. We do feel we are prevailing inthis with our Afghan partners," he said. "We cannot be in aposition of taking on ourselves bringing perfection toAfghanistan. That has to be left to Afghans."

But Crocker said there would be no repeat of the 1990s whena withdrawal of Western backers in the wake of the Sovietwithdrawal unleashed a vicious civil war out of which theTaliban and al Qaeda support bases arose.

BLOOD STAINS

Hundreds of police and intelligence agency troops surroundedthe area around Green Village after the attack. Ruined cars wereseen in front of the compound gates but officials said noattackers made it inside the heavily-guarded complex.

"I was going to the office when the car in front of me blewup. I got on my bicycle and fled," 40-year-old Farid AhmadMohammad told Reuters near the scene of the explosion.

A worker at the compound, Jamrod, said at a hospital wherethe wounded had been taken that he had been showing his identitycard at the compound's main gate when the vehicle exploded.

"I heard a bang and then I slammed into the wall," Jamrod,still clad in blood-stained jeans, told Reuters.

Wednesday's attack was the latest in a recent surge ofviolence after the Taliban announced they had begun their usual"spring offensive", and since they suspended tentative stepstowards peace talks with the United States.

Such incidents raise troubling questions about the readinessof Afghan forces to take over when militants remain able tostage high-profile attacks, even when already tight security hadbeen beefed up even further for Obama's visit.

Insurgents staged coordinated attacks in Kabul last month,paralyzing the city's centre and diplomatic area for 18 hours.

The Taliban also claimed responsibility for those attacks,but U.S. and Afghan officials blamed the militant, alQaeda-linked Haqqani network.

ELECTION YEAR

Obama's visit was clearly an election-year event.

He spoke to U.S. troops during a stay in Afghanistan ofroughly six hours and emphasized bin Laden's demise, an eventhis re-election campaign has touted as one of his most importantachievements in office.