Just past 2 a.m. Friday, an off-duty police officer and security guard are patrolling the sidewalk in front of the downtown Minneapolis Pizza Lucé.

They are looking for trouble.

"Leave the drink outside, ladies," the guard tells one hobbling, drunken gaggle of partyers. "Gotta see IDs," he says to another.

A shooting at Pizza Lucé landed the venue in trouble with regulators last year, but it remains open after agreeing to tougher security.

Meanwhile, other bars where a patron was shot in the last year, such as Champions and Epic, have closed.

Records and interviews show a wide patchwork of security and regulations governing Minneapolis bars and nightclubs, which are facing intense new scrutiny after someone shot nine people at 400 Soundbar last weekend. Police are still looking for a suspect, but the club is shutting down and all victims are expected to survive.

When clubs attract serious crime, city regulators can negotiate an array of conditions on their liquor licenses that usually call for bolstering security. Liquor licenses are the lifeblood for any downtown bar or nightclub, so the city has significant leverage to force changes.

"The interesting thing is the conditions are almost all customized," said business licensing director Grant Wilson. "There's none that are exactly the same."

He added that when it comes to allowing bars to stay open, "You look at the frequency of violence or dangerous behavior at a place."

The city imposed 20 such requirements on 400 Soundbar, including a rare directive to use metal detectors. Inspectors cited the club several times last year for not using the metal detectors as required.

The now-defunct Epic was one of the few other downtown clubs asked to use metal detectors, under a 2007 agreement with the city. The agreement restricted events for people under 21 and forbid the installation of pay phones. The club abruptly closed after a shooting inside left one man dead in November.

Augie's on Hennepin Avenue also has a metal detector, along with high-definition security cameras.

In March 2013, a patron was shot in the leg at Augie's as he left the restroom just before 2 a.m. The perpetrators were arrested, but the city didn't consider it indicative of a broader problem that would endanger the club's license.

That shooting and the one at 400 Soundbar "are isolated incidents. … We have a very safe city," said Brian Michael, owner of Augie's.

In 2011, Minneapolis officials required a security review of Aqua after two assaults inside, including one with a glass bottle.

New nightclub owners meet with the city officials during the application process to talk about a security plan, and also sit down with members of the local police precinct to talk about issues specific to the area, such as loitering or underage drinking.

"We have a couple hundred nightclubs downtown and we've only had real serious trouble with a handful," Wilson said.

Some clubs have faced only minor conditions, such as Barfly, which agreed in 2010 not to distribute fliers or handbills to the public.

Records show the city last imposed a condition on First Avenue in 2007, when the club improperly held an after-hours event for Prince that lasted until 4:30 a.m. and required 22 police officers working overtime to disperse the crowd. Regulators fined First Avenue $1,540 and had them sign an agreement not to hold events past legal hours of operation.

Downtown security guards and clubgoers said that while some venues pat down patrons, they are not always thorough and friends of the staff can get waved through.

Geneva Richards, a performer at several nightclubs, said she's seen security staff wave friends in.

"You show ID, but it depends on the people. … They don't look hard at all," Richards said.

As a regular nightclub worker and customer, she wished security officers would be more thorough.

At Spades Nightclub, where men are frisked and women are checked with a wand-type metal detector, security guard Mike Jackson said the problem happens when people fail to do proper pat-downs.

Guards at Brother's Bar & Grill, which sits at a sometimes raucous intersection on 1st Avenue, said they do not pat people down. Instead, they keep out troublemakers by insisting on a strict dress code that makes it harder to hide a gun.

In recent years, downtown clubs Karma and Envy have also shut down after a string of violent incidents.

A shooting at Pizza Lucé in June 2013 prompted an agreement with the city that required pat-downs on all male guests after midnight on Fridays and Saturdays and using electronic wands on female guests — at least for that summer.

The restaurant also agreed to allow no one under 21 in after midnight on the weekends for the next few months, while maintaining a list of banned patrons and hiring off-duty cops as needed.

"They had incidents out in the sidewalk because they have a huge following at bar close," Wilson said. "But they were really cooperative in taking safety measures and beefing up their security program and it's worked out."

Maya Rao • 612-673-4210