The arrest of a Swiss bodybuilder, who allegedly offered to kill the woman who accused basketball star Kobe Bryant of rape, is the latest high-profile sting operation by police in the United States.
Police say Patrick Graber, 31, claimed to be a Russian mafia hitman willing to kill the woman.
"He said he could make her not come to court, he could make her disappear, he could make her have a drug overdose - he was specific in this manner," said a spokesman for the Los Angeles Sheriff's office.
Agents can use deception to obtain evidence
Detectives said Mr Graber wanted $3m, and was arrested after accepting a bag full of fake banknotes as a down payment.
But even as they posed as criminals, the officers had to ensure that they stayed on the right side of entrapment rules.
Under US law, agents must not coerce someone into committing a crime or the suspects can be set free.
Marc Powers, a partner with the New York law firm of Reed Smith, told BBC News Online that government officers had a variety of options open to them.
"Agents are permitted to engage in different types of deceit and pretence and artifice to find out whether a target has a predisposition to commit a crime," he said.
They can then provide an opportunity for the target to commit that crime, all without being guilty of entrapment.
"The bottom line is that simply going up to someone and saying 'I might have an interest in purchasing these, can you assist me?' is not problematic here in the United States," Mr Powers said.
Sting operations are common.
Last month, federal agents working with counterparts in Britain and Russia claimed to have infiltrated the underworld of arms dealing and arranged the purchase of a missile which experts say could bring down a plane.
That operation took 18 months and resulted in the arrest of three men, who are now awaiting trial.
Defendants have the right to challenge the evidence against them and if a jury believes they have been entrapped, charges can be dismissed.
Courts have recognised that law officers can go too far - such as in the case of a Nebraska farmer indicted in 1987 for receiving child pornography through the post, but only after government agents had spent 26 months offering him such materials.
In the majority Supreme Court ruling in that case in 1992, Justice Byron White wrote: "In their zeal to enforce the law, however, government agents may not originate a criminal design, implant in an innocent person's mind the disposition to commit a criminal act, and then induce commission of the crime so that the government may prosecute."
Justice White also wrote: "When the government's quest for convictions leads to the apprehension of an otherwise law-abiding citizen who, if left to his own devices, likely would have never run afoul of the law, the courts should intervene."
Once the question of entrapment is raised, it is up to the prosecution to prove beyond a reasonable doubt that government agents did not force the crime.
'Knowing and willing'
In the weapon case, officials say that government agents both sold the missile to alleged arms dealer Hemant Lakhani and also offered to buy it.
Christopher Christie, US Attorney for New Jersey, said that Mr Lakhani was not duped into committing a crime.
"Mr Lakhani believed and proved himself willing to deal with groups that he thought were terrorists, and that specifically stated that they intended to use this missile for terrorist
activity in the United States against commercial airliners.
"So, Mr Lakhani knew full well what he was doing, why he was doing it," he said.
In the Bryant case, the defence lawyer for alleged hitman said his client was simply "naive and not very swift".
"It could easily be made his defence," said attorney Peter Knecht, that Mr Graber was an ambitious con man and not a potential murderer.
However, Mr Graber's defence team has not - as yet - challenged the way in which police used a sting operation to detain him.