
    Anthony BEASLEY, Plaintiff-Appellant, v. CITY OF KEIZER; John Teague, Captain; Jeff Kuhns, Captain; Timothy S. Lathrop, Detective; John Troncoso, Sgt.; Lori Evans; Katie Suver, Defendants-Appellees.
    No. 11-35591.
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted March 4, 2013.
    Filed May 14, 2013.
    
      Brian L. Michaels, Brian Michaels PC, Marianne G. Dugan, Eugene, OR, for Plaintiff-Appellant.
    Gerald L. Warren, Law Office of Gerald Warren, David B. Thompson, Assistant Attorney General, Office of the Oregon Attorney General, Salem, OR, for Defendants-Appellees.
    Before: TASHIMA, CLIFTON, and BEA, Circuit Judges.
   MEMORANDUM

Plaintiff Anthony Beasley appeals from the district court’s grant of summary judgment in favor of Defendants. Beasley asserts claims under 42 U.S.C. § 1983 against Deputy District Attorneys Lori Evans and Katie Suver of Marion County (together, the “District Attorneys”), and against Officer Timothy Lathrop, Captain John Teague, Captain Jeff Kuhns, and Sergeant John Troncoso of the Keizer Police Department (collectively, the “Officers”). Beasley alleges Fourth Amendment violations stemming from the 2007 search of his residence and his subsequent arrest, which arose in connection with his undisputed production of hashish oil. The district court granted summary judgment on the ground that, even if there was no probable cause to believe that Beasley had violated state law, there was no Fourth Amendment violation because probable cause existed that Beasley had violated the federal Controlled Substances Act, 21 U.S.C. § 801 et seq. We have jurisdiction under 28 U.S.C. § 1291, and we affirm.

1. The relevant Oregon statutes and case law establish that there was no probable cause of a state law violation. Beasley was registered to grow medical marijuana in his home pursuant to the Oregon Medical Marijuana Act (“OMMA”). Or.Rev.Stat. § 475.302 provides that, for purposes of OMMA, “marijuana” has the meaning given that term in Or.Rev.Stat. § 475.005. See Or.Rev.Stat. § 475.302(6). In State v. Ness, 54 Or.App. 530, 635 P.2d 1025, 1029-30 (1981), the Oregon Court of Appeals held that marijuana, hashish, and hashish oil all fall under § 475.005’s definition of “marijuana.” See also State v. Hasselback, 65 Or.App. 223, 670 P.2d 632, 632 (1983). Thus, OMMA’s protections for marijuana apply, by definition, to hashish oil.

Provided that certain conditions are met, OMMA exempts licensed persons “from the criminal laws of the state for possession, delivery or production of marijuana.” Or.Rev.Stat. § 475.309(1). The Oregon statute relied upon by the District Attorneys and the Officers at the time of the search and arrest, which prohibits the manufacturing of controlled substances within 1,000 of a school, falls within the scope of this exemption. See Or.Rev.Stat. § 475.904. As such, there was no basis for state criminal liability.

2. Beasley’s Fourth Amendment claims nevertheless fail because both the Officers and the District Attorneys are entitled to qualified immunity. Qualified immunity shields government officials from civil liability unless a plaintiff demonstrates: “(1), that the official violated a statutory or constitutional right, and (2) that the right was ‘clearly established’ at the time of the challenged conduct.” Ashcroft v. al-Kidd, — U.S. -, 131 S.Ct. 2074, 2080, 179 L.Ed.2d 1149 (2011). Here, we grant qualified immunity under the latter prong of this framework without the need to decide whether there was an underlying constitutional violation. See Pearson v. Callahan, 555 U.S. 223, 227, 129 S.Ct. 808, 172 L.Ed.2d 565 (2009) (permitting inquiry into either prong first).

Even assuming, arguendo, that our decision in United States v. $186,46.00 in U.S. Currency, 590 F.3d 942 (9th Cir.2010), supported Beasley’s constitutional claim, that decision postdated the events in question by several years. Beasley is unable to point to any judicial opinion prior to October 2007 holding that a search conducted by local officials violates the Fourth Amendment when those officials do not have probable cause of a state violation but do have probable cause of a federal violation. Because existing precedent hardly “placed the statutory or constitutional question beyond debate,” al-Kidd, 131 S.Ct. at 2083, Beasley cannot demonstrate the violation of a clearly established right. Thus, both the District Attorneys and the Officers are entitled to qualified immunity.

The Officers are entitled to qualified immunity on the additional ground that they reasonably relied on the District Attorneys’ legal advice. Although reliance on a prosecutor’s legal advice “will not automatically insulate an officer from liability, it goes far to establish qualified immunity.” Ewing v. City of Stockton, 588 F.3d 1218, 1231 (9th Cir.2009) (internal quotation marks omitted). In the instant case, the District Attorneys rendered advice on a purely legal question, the answer for which required a proper reading of a complex statutory scheme and applicable case law. Indeed, Officer Lathrop proceeded precisely as one would want an officer to proceed under the circumstances — unsure of a novel legal question, he consulted with a prosecutor for guidance. Thus, the Officers were not “plainly incompetent,” nor did they “knowingly violate the law,” and qualified immunity is appropriate. al-Kidd, 131 S.Ct. at 2085 (internal quotation marks omitted).

The judgment of the district court is AFFIRMED. 
      
       This disposition is not appropriate for publication and is not precedent except as provided by 9th Cir. R. 36-3.
     
      
      . The District Attorneys concede this issue on appeal, but the Officers do not.
     
      
      . There is no suggestion that Beasley was not in conformity these required conditions. See Or.Rev.Stat. § 475.309(l)(a)-(b); see also Or. Rev.Stat. § 475.320.
     