In recent weeks, lively Philadelphia nightclubs have been hit by deadly gun violence.

A gun battle erupted among club-goers leaving Dreemz Ultra Lounge in Old City last month, leaving one man dead and another critically wounded.

A man fired a gun outside Koko Bongo in University City on Oct. 28, striking a police officer in the leg and grazing a bystander. Police shot and killed the gunman.

Police from the University of Pennsylvania killed a man inside Club Wizzards at 38th and Chestnut Streets on Nov. 26 after he shot and critically injured the club's DJ.

As the city struggles with a proliferation of illegal guns while trying to promote a thriving night scene, fun has turned into mayhem in neighborhoods otherwise considered safe.

"We're stunned by the violence of it," said Rich Thom of the Old City Civic Association.

"It's a tremendous burden," said Lt. Francis Healy, special adviser to Commissioner Sylvester M. Johnson, of the need some nightspots have for police because of their unruly reputations.

"They have to understand," Healy said of all clubs, "they have a duty and responsibility to the police and to the community."

Many do, he noted, but some are "out to make a buck and they just don't care."

Penn and the city have been trying to negotiate security improvements with the owners of Koko Bongo, but the university is wary of such establishments' bumping up against its campus.

"If you cater to people who carry guns, I don't know of any institution that wants that," said Maureen Rush, Penn's vice president for public safety.

City police added a special detail of 10 officers to Koko Bongo after multiple fights broke out the weekend before the shooting.

The club had been hiring promoters with reputations for packing a venue, sometimes with rowdy patrons, police said.

Healy said that the club was "blindsided" by the crowd the night of the police shooting and that its owners had promised to make safety improvements.

Koko Bongo, which had voluntarily closed due to the shooting, reopened last weekend, police said.

Its owners did not respond to requests for comment.

In Old City, the civic association "had high hopes that we had the weapons under control," said Thom, an architect and urban planner.

The historic neighborhood has more than 100 liquor licenses - one of the highest concentrations in the country. Most of those licenses are held by eateries and bars that rarely draw negative attention.

The Old City association has vigorously pursued tough conditions on liquor licenses to keep existing clubs in line and make sure questionable ones don't emerge. But Dreemz, Thom said, was "one of the few places we hadn't gotten our arms around."

About 2 a.m. Nov. 18, patrons leaving the club at 120 Chestnut St. had an altercation in a nearby parking lot, police said.

A surveillance camera was recording when the bullets started to fly.

"It looks like the Wild West," Harvey Spear, the parking lot owner, said of the video captured by his camera.

James Glover, 23, of Upper Darby, was shot in the head and killed. Another man was wounded. Police said it was unclear if Glover was an armed participant. No one has been charged with the murder.

Dreemz management did not respond to phone and e-mail requests for comment.

Healy said that the club has a metal detector and that it appears the shooters left the club and got guns out of their cars. He said Dreemz should not be blamed for what happened that night because it had security precautions in place.

That is little comfort for some neighbors.

"Almost every weekend there's an incident with this club," Spear said.

Residents of areas such as Old City, University City and Northern Liberties have been working with city and state officials, the police, and the District Attorney's Office to rein in nuisance clubs and bars.

Robert Theil, an aide to State Sen. Vincent J. Fumo (D., Phila.), has helped Old City and Northern Liberties in their fight to clean up the club scene.

What Theil and locals have to watch for, especially in Old City, are operators who start as restaurants but then become booze-pushing clubs.

"They have to make money wherever they can," Theil said. "They have investors to answer to."

In Northern Liberties, the local civic group's ire has been directed at two nightspots on Spring Garden Street: Transit and the Palmer Social Club.

State liquor-license records show that both establishments, which are across the street from each other, have been hit with liquor and noise citations in recent years.

"We have to have the cops on top of them constantly," Theil said. "It siphons off police from other parts of the city."

Both clubs are after-hours, so closing time is 3 a.m. Off-duty police are hired by the owners of Transit and Palmer to maintain order. Extra on-duty police also gather to handle crowd control.

On a recent weekend, a reporter watched both clubs gradually empty. The Palmer crowd was the noisier bunch, and at least one fight threatened to break out. But the police managed the situation effectively, no one was arrested, and by 3:30 a.m. most of the club patrons had left.

But years of fighting the clubs has worn down the patience of the neighborhood.

"They're both nuisance clubs as far as we're concerned," said Jennifer Lewis, president of the Northern Liberties Neighbors Association. "We would ultimately like them not to be there."

The owners of the clubs did not respond to requests for comment.

Contact staff writer Robert Moran at 215-854-5983 or bmoran@phillynews.com.