A California appeals court has overturned a teenager's gun conviction due to the fact that the gun was discovered during an illegal search for marijuana. In January 2015, police responded to reports of an individual spotted with a gun in the Bayview district of San Francisco. Cops approached a group of suspected gang members, and singled out a 17-year-old, identified only as D.W., because they smelled marijuana on him.

D.W. admitted to the police that he had just smoked pot, and the officers searched him for drugs. During the search, police discovered a revolver in the teen's backpack, and arrested him. A juvenile court judge ruled that the search was legal, and found D.W. guilty of firearms offenses. The teen's attorneys appealed, but an appeals court upheld the ruling last year.

This year, however, the California Supreme Court asked the appeals court to reconsider this ruling in light of a recent search case that came before the higher court last December. In this case, a man had been stopped and searched after running a stop sign on his bicycle. The Supreme Court ruled that because running a stop sign is only an infraction, it was not legal grounds for a warrantless search and arrest.

After considering this ruling, the First District Court of Appeal in San Francisco noted that the crime that police suspected D.W. of committing, namely the possession of a small amount of cannabis, was only an infraction punishable by a maximum fine of $100. Because of this, the court ruled that the police had no legal grounds to search the teen without a warrant. D.W.'s conviction was overturned because the gun, which was the only evidence of the teen's crime, was discovered during an illegal search.