In this March 26, 2014 file photo, California state Sen. Leland Yee, D-San Francisco, right, leaves the San Francisco Federal Building in San Francisco.

The FBI used millions of dollars, liquor and cigarettes seized in other cases, and more than a dozen undercover operatives in an elaborate, seven-year sting operation targeting a Chinatown association in San Francisco thought to be a front for a notorious organized crime syndicate.

The agents, posing as honest businessmen and a Mafia figure, spent freely and aggressively offered their targets criminal schemes, leading to the indictment of 29 people — including state Sen. Leland Yee, D-San Francisco — on charges that included money laundering, public corruption and gun trafficking.

The agents’ behavior has already become a central issue in the month-old case, with defense lawyers arguing that the FBI entrapped otherwise honest people by luring them into criminal schemes hatched by the government.

It’s an argument numerous suspected terrorists, politicians and others have made when caught in a government sting.

But legal experts say the entrapment defense rarely works. Sting targets have to prove much more than simply that the government made them do it.

They have to show they weren’t predisposed to committing the criminal acts proposed by undercover agents.

“Entrapment is often raised but seldom successful,” said Notre Dame University law school professor Jimmy Gurule, a former federal prosecutor and high-ranking U.S. Department of Justice official under President George H.W. Bush.

Undercover government agents are given wide latitude in setting up their targets, and U.S. Supreme Court rulings and Department of Justice guidelines make it clear they view sting operations as necessary and desirable to fight serious crime.

Entrapment claims work in court only in “extreme cases of outrageous government conduct,” Gurule said.

In the San Francisco case, Gurule said federal prosecutors have to prove only that Yee and other targets of government stings were “predisposed to commit the crime.”

When the FBI targets politicians, Gurule said the investigators usually need valid reasons to approach them with bribe offers, such as evidence or reports of previous solicitations. Agents, he said, look for a pattern of behavior.

Yee was arrested March 26, the same day FBI agents arrested Mayor Patrick Cannon of Charlotte, N.C., who is also accused of taking bribes from undercover agents posing as business people seeking political favors or influence.

Yee has pleaded not guilty and his attorney, Jim Lassart, declined to comment on his defense.