At the heart of the Petraeus investigation is Jill Kelley

Tampa: Jill and Scott Kelley moved to Tampa in Florida nearly a decade ago, taking up residence in a huge redbrick home with a spectacular view of the water on Bayshore Boulevard, the city's most fashionable street. They quickly established themselves as social hosts to the powerful four-star officers who run two of the nation's most important military commands.

The Kelleys were known for their lavish parties, with extravagant buffets, flowing Champagne, valet parking and cigars for guests from nearby MacDill Air Force Base, including David H. Petraeus and Gen. John R. Allen, who now commands troops in Afghanistan. "Tampa is the kind of community where, if you're new to the community, you can carve out your own niche," said Pam Iorio, the city's former mayor, who recalls mingling with Petraeus and his wife, Holly, at the Kelleys' home. "They decided to carve out a niche with the military."

Now the social link between Tampa's military and civilian elite is at the centre of an unfolding Washington scandal that has already cost Petraeus his job as director of the Central Intelligence Agency and is threatening to undermine the reputation of Allen, who was Petraeus' deputy when he was here from 2008 to 2010.

At the heart of the investigation is the Tampa woman who spawned it: Kelley, who received threatening anonymous emails that set off an FBI investigation revealing that Petraeus had an affair with his biographer, Paula Broadwell. On Tuesday, Allen was caught up in the scandal, when the Pentagon said that it was investigating whether he had engaged in "inappropriate communication" with Kelley; associates of the general say the messages were innocent and President Barack Obama voiced support for him.

Records show that Kelley and her husband, a doctor, have been subject to a string of lawsuits over debts, according to a report in The Tampa Bay Times, which said the Kelleys owed a bank nearly $2.2 million, including attorney fees, on a building they own. They also ran a cancer charity, which appears to be defunct. A 2007 tax filing, the latest available, shows the charity raised $157,284 that year, but spent just $58,417 on program services, described as conducting research to improve the lives of terminally ill adult cancer patients.

Their parties, though, were the talk of the town. In February 2010, a gossip column in The Tampa Bay Times reported that Petraeus and his wife arrived escorted by 28 police officers on motorcycles to a pirate-themed party at the Kelleys' home, to mark Tampa's Gasparilla Pirate Fest, an annual event. Guests dined on lamb chops and crab cakes, beside hot dog and funnel cake carts, the paper said.

The couple appeared to be well regarded at MacDill, home to Central Command, which runs the wars in Iraq and Afghanistan and hosts officers from more than 50 foreign countries, and Special Operations Command, which trains commandos for missions like the one that killed Osama Bin Laden. The two sit side by side on the base, where generals, admirals and other high-ranking officers live in elegant homes on a spit of land that juts into Tampa Bay. Often, they invite community leaders to social receptions of their own.

Indeed, Petraeus and his wife grew so close to the Kelleys that they hosted the couple and Kelley's twin sister, Natalie Khawam, for Christmas dinner last year. Both Allen and Petraeus also wrote letters to a District of Columbia court vouching for Khawam in a child custody dispute.

That kind of closeness - and the Kelleys' fancy parties - strikes some military people as odd.

"I have never known there to be groupies around generals," said Jacey Eckhart, the military spouse editor of the website military.com. "But just like in every other field of endeavour, there is a certain excitement around people that have great power. And generals, like captains of industry and certain kinds of celebrities, wield a certain kind of power."

MacDill Air Force Base is a driving force behind the Tampa economy. The local chamber of commerce estimates $6.7 billion a year flows into the Tampa Bay area from the base. Military contractors and other defence-related companies dot the city. Business deals are often made in the plentiful strip clubs and steakhouses.

After the terrorist attacks of Sept. 11, 2001, the base only grew in importance, as Central Command and Special Operations Command took on leading roles in the wars in Afghanistan and Iraq. It is unusual to have two high-level commands on the same base; their proximity puts MacDill at the centre of U.S. military activity. The CentCom commander is typically a local star.

"He was looked at like the CEO of Chrysler is in Detroit," said Roger Maddox, a retired military officer who lives here. "Bigger than the mayor. His existence is what brings so much money to the community."

The community has tried to respond in kind, welcoming commanders who are outsiders when they arrive.

"Generally when they get down here they have no connection to Tampa but immediately they become part of the fabric of the community," said John Lauro, a former federal prosecutor in New York who has lived in Tampa for the past 20 years. "People reach out to them, want to get close to them."

Kelley worked hard to develop that closeness, and functioned as a kind of social liaison between the military commanders and the community. But some here were a bit suspicious of her.

Tampa is, at heart, a conservative Southern city whose most prominent citizens have lived here for decades. Kelley, a daughter of Lebanese immigrants who grew up in Philadelphia, and her husband Scott, a cancer surgeon, are still regarded as newcomers.

They were often seen at the Tampa Yacht and Country Club; the late George Steinbrenner, owner of the New York Yankees, was a member. And Kelley and her sister, Khawam, raised eyebrows for their 2003 appearance on a Food Network reality show, "Food Fight."

While other prominent Tampa residents were supporting the military in other ways - raising money for wounded veterans, waving flags as a way of showing respect, helping military children with medical needs - the Kelleys stuck mostly to social events, said Iorio.

When foreign dignitaries visited Central Command, the command's generals could count on the Kelleys to host a dinner in the dignitaries' honour. Even as news of Kelley's connection to the emerging Petraeus scandal began spreading Sunday evening, the deputy commander of the Central Command, Vice Admiral Robert S. Harward, was attending a party at her bayside home.