SAN FRANCISCO -- On a cloudy afternoon in the Tenderloin district, a man in a hooded sweatshirt walks slowly along Market Street, stopping to engage people he encounters along the way. He offers a peek at the wares inside the backpack slung over his shoulder: Three new iPhones, each still sealed in a white box affixed with Apple’s logo. He stole these phones, he tells potential customers, before asking them to make an offer.

He walks past a check-cashing shop and a boarded-up pharmacy until he attracts an interested buyer. But before the deal is done, another man dashes out of a nearby donut shop and mumbles a warning to the would-be buyer in Spanish. He suspects the seller is a cop. Suddenly nervous, the buyer walks away.

The man in the hoodie is indeed a policeman: Officer Tom Lee is playing the role of decoy in a sting operation targeting buyers of stolen iPhones. Beneath his sweatshirt, he wears a small recording device taped to his chest. Nearby, two plainclothes officers blend into the crowd, armed with guns to protect Lee should the deal go bad. A block away, two more officers sit in an unmarked car, awaiting Lee’s signal for them to make an arrest.

Lee approaches a heavy-set man standing outside the red awning of a Carl's Jr. burger restaurant. The man wears glasses and a black pinstripe suit. He inspects the iPhone and offers $100. Lee takes the cash, hands over the phone and gives the signal. Four officers swoop in and place the man in handcuffs, notching another arrest in the intensifying cat-and-mouse game playing out here and in other major American cities between law enforcement and criminals looking to profit from the burgeoning trade in stolen mobile devices.

Lee and his team are part of a special task force established three years ago to combat phone thefts here, mirroring similar undercover teams set up in New York and Washington D.C. They have not chosen this corner at random. The intersection of Seventh and Market is San Francisco’s primary open-air market for stolen electronics, police say. Given that nearly half of San Francisco residents own an iPhone -- the highest rate of any city in the nation -- this stolen phone bazaar amounts to a crucial conduit in an illicit, increasingly global trade.

Police say stolen phones bought here are often resold overseas -- in part to avoid a domestic blacklist being established by American wireless carriers -- eventually fetching as much as $1,000 at markets scattered from Hong Kong to Rio de Janeiro. The total value of lost or stolen phones in the U.S. is about $30 billion a year,according to the mobile-security firm Lookout.

Nearly half of all robberies in San Francisco last year involved smartphones, according to police. After thieves across the Bay Area swipe iPhones or iPads, police use GPS sensors in the devices to trace them here, to the corner of Seventh and Market.

For Lee and his partners, shutting down this marketplace has become their primary objective. Initially, the undercover unit focused on catching people stealing phones. Officers rode city trains and buses while appearing to carelessly text, hoping to attract thieves. But hardly anyone took the bait. Now, the task force is pursuing a new strategy: arresting buyers. The team aims to poison the market with fear and distrust, depriving would-be sellers of a place to unload their stolen merchandise.

"If they steal the phone but can't sell it, there's no market," San Francisco Police Capt. Joe Garrity says. "We're cutting the head off the snake."

The tactics are controversial. Defense attorneys say undercover stings entrap ordinary people who are looking for deals on smartphones and have no plans to engage in crime. "You're basically creating crime or luring people to commit crimes," says Chesa Boudin, a San Francisco public defender. "It’s an outrageous waste of resources."

Others question their effectiveness. San Francisco District Attorney George Gascon says decoy operations "yield little deterrence" and have failed to reduce phone thefts in the city. "The numbers don’t appear to be abating at all," Gascon said in an interview. "This is like the drug war -- the more arrests you make for drug use, the more drug use seems to go on."

But police say most buyers who arrive at Seventh and Market are far from innocent: They are street-level merchants who comprise a key link in the global distribution system for stolen iPhones and iPads. Police say these undercover operations present their best means of stopping the modern-day crime wave sweeping the country.

"It’s important to send a message to criminals that you can’t just buy stolen property in the street," Garrity says. "This isn’t Macy’s or a bargain basement. It’s illegal."

A STOLEN PHONE BAZAAR

A fast-talking 54-year-old who resembles former New York Mayor Rudy Giuliani, Garrity has spent three decades on the San Francisco force, most of it in the Tenderloin, along the way rising from patrolman to sergeant to lieutenant to captain. ("Everything but the janitor," he says.)

On a recent afternoon, he was sitting at a table at the police station, going over instructions for an upcoming iPhone sting. Not for the first time, the task force is targeting Seventh and Market.

"These guys haven’t been hit in a month," Garrity tells the eight officers sitting before him. "So they’re ripe for the picking."

The red-brick plaza is populated by drifters, addicts and homeless men camped out outside Donut World, Bargain Bee and Carl's Jr. Over the years, the corner has nurtured a wide variety of black-market commodities, from pirated DVDs to counterfeit North Face jackets and copied Gucci purses. But these days, commerce revolves largely around stolen Apple products, a fact that attests both to the street value of the mobile devices and the apparent ease of swiping them from victims whose heads are down with their eyes fixed on tiny screens.

"Everybody is distracted," says Garrity, struck by the vulnerability of pedestrians who carelessly hold their gadgets. "Shit, I could grab that phone, take off running and no one would catch me, then run down to Seventh and Market and sell it."

iphone thefts
San Francisco Police Capt. Joe Garrity says undercover stings are disrupting the stolen iPhone market.

The fact that San Francisco has become a central clearinghouse for stolen iPhones is not surprising. The city is uniquely loyal to products made by Apple, which is headquartered only 40 miles south in Cupertino, Calif. Forty-eight percent of San Francisco residents own an iPhone, according to research by Samsung, Apple's main smartphone competitor.

Apple chief executive Tim Cook unveiled the iPhone 5 at a special event last fall in the city's Yerba Buena Center for the Arts. But less than a mile away, stolen iPhones and iPads are routinely bought and sold at Seventh and Market.

To disrupt this underground trade, Tom Lee plays the role of a stolen iPhone salesman. A 37-year-old Asian-American man, Lee is something of an Apple expert. Before becoming a police officer six years ago, he worked at an Apple store. The retail experience allowed Lee to perfect his sales pitch, now repurposed as part of a law enforcement ruse.

On a recent afternoon, Lee wore a green hooded sweatshirt, blue jeans, and white Adidas sneakers, a wardrobe that makes him look "more streetlike," he says. Normally soft-spoken and reserved, he becomes more aggressive undercover.

"You're not going to be polite when selling phones because that will give it away," he explains. "I try to mimic the way they speak. If they use profanities, I’ll throw a few in."

After brief small talk, Lee tells buyers that he is selling iPhones that he stole from a nearby Apple store. He never suggests a price, in order to avoid the appearance of entrapment, he says. Instead, he invites buyers to make him an offer.

Before paying, they often inspect the phones to make sure they work. Then, they typically check to see if he is a cop. They pat him down, feeling his hip for a gun and his lower abdomen for a bulletproof vest, overlooking the small recording device taped to his chest.

Lee worries about how prospective buyers might respond should his cover be blown. He is unarmed, but some of his buyers have been arrested while carrying small knives and guns. Still, he remains calm, knowing the "close cover" officer -- his undercover bodyguard -- is armed and standing nearby.

"I know I can trust my life to him," Lee says.

Handsome and clean-shaven, Lee has proven to be a convincing stolen iPhone salesman. He has performed in about 10 sting operations, he estimates, never failing to attract at least one buyer. Those buyers have paid between $25 and $200 for his iPhones, depending on the model and whether the item is still in its box.

But recently, Lee's superiors have expressed concern about using him too often: Some buyers appear to be avoiding him. "I wonder if they’re starting to get suspicious," Sgt. Jerry Darcy says.

iphone thefts
Apple loans the department these iPhones to use as bait in undercover stings.

In San Francisco, as in many major cities, buyers and sellers of stolen phones tend to organize into teams that resemble drug-dealing street gangs, police say. Some have as many as 10 members.

A certain tight-knit group refuses to purchase stolen phones from sellers they don't know and trust, Lee explains. One member serves as a police lookout, another works as a go-between, or a "hook," who connects buyers and sellers. Others are like members of a baton relay team, accepting the handoff from the buyer so that he isn’t carrying a stolen phone if he’s caught by police.

In February, police arrested a man who traveled more than an hour via BART train from Hayward, Calif., to buy phones at Seventh and Market. In his pockets, police found $426 in cash, two stolen iPhones that he had bought from an undercover officer for $300, and seven SIM cards, the tiny removable chips that connect each device to a particular network. When phones are reported stolen, wireless providers block their SIM cards, but thieves routinely replace them with new SIMs and resell stolen phones for use on other networks, police say.

Before the sting, Garrity tells his officers to look for both stolen phones and SIM cards: "Go through these guys with a fine-toothed comb." He also reminds officers not to move in prematurely. "Once Tom gives the signal, you grab him," he says.

Three iPhone boxes sit on a table in front of him. Garrity takes a Sharpie and marks each with a black dot, to be able to identify them after an arrest.

Apple loans the department iPhones to use as bait on undercover stings. But officers have lost a few. Once, after buying a stolen iPhone from an undercover officer, a man evaded arrest by sprinting down the subway stairs, jumping over the turnstile and running down the tracks. Another time, a man bought an iPhone and dashed into a crowded pizza parlor, handing off the phone to an associate who got away.

As the officers stand up and head for their squad cars, Garrity issues one last order: "Try not to lose the fucking phones!"

A CONTROVERSIAL STRATEGY

Garrity’s team is accustomed to undercover work. For years, his officers wandered the streets wearing tattered clothing, reeking of alcohol and slurring their speech. They asked homeless people for cigarettes and arrested those who grabbed at the $20 bills they purposely dangled from their breast pockets. Defense attorneys and civil rights advocates argued the resulting busts merely padded robbery arrest rates, instead of protecting the homeless from street crime.

The undercover stings targeting iPhone buyers have provoked similar concerns. In February, San Francisco police arrested an undocumented Mexican immigrant for buying two stolen iPhones from an undercover officer at Seventh and Market. The man, who had two children and no criminal record, did not speak English and did not understand the officer, according to Boudin, the public defender. After his arrest, police notified federal immigration officials. The man spent a week in jail while his attorney fought to prevent him from being deported. He was later released and sentenced to community service.

In 2011, New York police arrested 237 people over a five-day period for buying and selling stolen iPhones and iPads from undercover officers. The officers told buyers they had stolen the devices from an Apple store in Manhattan.

Robert Tester, 20, of Brooklyn, was among those arrested. Tester said the undercover officer was "relentless" and insisted that he buy the iPhone, even after Tester refused. The officer claimed he needed money to buy his daughter Christmas presents, according to a federal lawsuit Tester filed against the city in January.

Tester bought the iPhone for $20 because he was "feeling sorry" for the seller and his daughter, his suit claims. He said he did not know the phone was stolen. The charges were dropped, but Tester claims his arrest made him miss work and caused him psychological injury. He is seeking $150,000 in damages. His suit is pending.

"Trying to root out merchants who are known dealers in stolen electronics is one matter; luring unsuspecting and otherwise law-abiding teenagers to ‘buy’ goods from undercover officers is another matter entirely," New York City Councilman Vincent Gentile wrote to Police Commissioner Raymond Kelly after the sting that caught Tester.

Gentile asked Kelly to conduct an investigation into "Operation Take Back," as the NYPD called it. Instead, Kelly responded in a letter that said the sting was "carefully supervised and closely controlled."

"The individuals arrested during this initiative attempted to purchase items which they clearly knew were stolen," Kelly wrote.

A STING GOES BUST

As Lee looks for buyers along San Francisco’s Market Street, officers park their squad cars a few blocks away, out of sight. They listen to the voice of a second undercover officer -- the "close cover" -- crackle over the police radio. In police code, he provides a running play-by-play. Lee, the "UC," and his buyer, a black male, or "BM," are nearing a deal.

"UC at Fifth and Market at northwest corner," the officer says over the radio. "He’s westbound, almost at the check cashing place ... BM with red hat and gray jacket ... BM is taking out money ... BM is looking at the phones."

Minutes later, after the officers swoop in, the buyer and a man who police say brokered the deal stand at Seventh and Market with their hands cuffed behind their backs. As some 50 pedestrians gather in the plaza to watch, officers search the buyer’s blue messenger bag. They find their iPhone with the black dot and $438 in cash. They lead the two men into the back of a marked police car.

Back at the police station, Officer Damon Jackson questions the men in a small interrogation room. Jackson reads them their Miranda rights, but both choose to give statements defending themselves.

The man blamed for brokering the deal says he is homeless and staying in a shelter. He wears gray Nike sneakers, jeans and a gray cardigan over a red T-shirt. He says the undercover officer offered him "a couple bucks" to connect him with buyers, adding that he did not know anything about the phones being stolen.

He is charged with a misdemeanor for attempting to buy stolen property. A few days later, a judge sentences him to community service -- a common fate for those arrested in undercover police stings.

The buyer, the man in the black suit, tells police he rode the BART train that day from his home in Berkeley with the intention of buying a used phone. He claims he knows nothing about the phones being stolen.

"I want my $100 back!" he shouts at the officers.

Searching his messenger bag again, officers find a Motorola smartphone missing its battery and SIM card. Garrity cites this as evidence of an experienced buyer at work: Who else would swap the SIM card before reselling a stolen phone?

"This is not his first time at the rodeo," Garrity says.

But the police find a problem with their bust: Lee never told the man in the suit that the iPhone he was buying was stolen. They have to let him go.

Officers remove his handcuffs and return his $100, along with his messenger bag. He leaves the police station on foot.

Garrity explains later that the undercover stings "are hit or miss sometimes," but he defends the strategy. "It’s been successful," he says. "If we just sit back and do nothing, they’d be down at Seventh and Market in droves. We have to do something to address this problem."