The entrapment defense in the United States has evolved mainly through case law. Two competing tests exist for determining whether entrapment has taken place, known as the "subjective" and "objective" tests. The "subjective" test looks at the defendant's state of mind; entrapment can be claimed if the defendant had no "predisposition" to commit the crime. The "objective" test looks instead at the government's conduct; entrapment occurs when the actions of government officers would have caused a normally law-abiding person to commit a crime.
Courts took a dim view of the defense at first. "[It] has never availed to shield crime or give indemnity to the culprit, and it is safe to say that under any code of civilized, not to say Christian, ethics, it never will" a New York Supreme Court said in 1864. Forty years later, another judge in that state would affirm that rejection, arguing "[courts] should not hesitate to punish the crime actually committed by the defendant" when rejecting entrapment claimed in a grand larceny case.
Other states, however, had already begun reversing convictions on entrapment grounds. Federal courts recognized entrapment as a defense starting with Woo Wai v. United States (223 F 412 (9th Circuit 1915)). The U.S. Supreme Court first declined to consider the question of entrapment in Casey v. United States (276 U.S. 413 (1928)), since the facts in the case were too vague to definitively rule on the question. Four years later, it did and in Sorrells v. United States (287 U.S. 435 (1932)) unanimously reversed the conviction of a North Carolina factory worker who gave in to an undercover Prohibition officer's repeated entreaties to get him some liquor. It identified the controlling question as "whether the defendant is a person otherwise innocent whom the government is seeking to punish for an alleged offense which is the product of the creative activity of its own officials".
In Sherman v. United States (356 U.S. 369 (1958)), the Court considered a similar case in which one recovering drug addict working with federal agents from the Federal Bureau of Narcotics (a predecessor agency to today's Drug Enforcement Administration (DEA)) solicited another to sell him drugs on the premise that his own efforts were failing. Again unanimous, its opinion focused more clearly on the defendant's predisposition to commit the offense, and on that basis overturned Sherman's conviction as well, since although he had two prior drug convictions, the most recent dated back five years. He was also attempting to rehabilitate himself, had made no profit on the sales and no drugs were found in his apartment when it was searched, suggesting the absence of a predisposition to break drug laws. "To determine whether entrapment has been established," it said, "a line must be drawn between the trap for the unwary innocent and the trap for the unwary criminal".