The opinion of the court was delivered by: Nicholson , J.
California Rules of Court, rule 8.1115(a), prohibits courts and parties from citing or relying on opinions not certified for publication or ordered published, except as specified by rule 8.1115(b). This opinion has not been certified for publication or ordered published for purposes of rule 8.1115.
Defendant Bradley Allen Strain pleaded no contest to possession of methamphetamine for sale (Health & Saf. Code, § 11378). The trial court sentenced defendant to three years in state prison.
On appeal, defendant raises three challenges to the state prison sentence. He contends: (1) the trial court could not rely on the out-of-state prior because it was not pleaded or proven; (2) there is insufficient evidence to support the trial court's finding that he had a prior out-of-state serious felony conviction which disqualified him from the county jail provisions of Penal Code section 1170, subdivision (h); and (3) the state prison commitment violated the terms of his plea agreement.
Agreeing with defendant's second contention, we vacate the sentence and remand for resentencing.
FACTUAL AND PROCEDURAL BACKGROUND
We dispense with the facts of defendant's crime, as they are unnecessary to resolve this appeal.
Defendant was charged by information with transportation of methamphetamine (Health & Saf. Code, § 11379, subd. (a)), possession of methamphetamine for sale (Health & Saf. Code, § 11378), and driving with a suspended license (Veh. Code, § 14601.2, subd. (a)). The information also alleged enhancements for a prior prison term (Pen. Code, § 667.5, subd. (b)), and two prior felony convictions for driving under the influence with three or more prior driving under the influence convictions within 10 years (Pen. Code, § 1203, subd. (e)(4); Veh. Code, §§ 23152, subd. (a), 23550).
Defendant signed and initialed a written plea declaration, which was signed by defense counsel, the prosecutor, and the trial court. Defendant initialed a provision describing the agreement as follows: "I will enter into a no contest plea to Count 2 -- Health and Safety Code section 11378, possession of a controlled substance for sale. Remaining counts and enhancement[s] will be dropped. I will be sentenced to the upper term of three years, which will be served in county prison pursuant to AB 109."*fn1
The trial court (Shockley, J.) held a plea hearing on September 23, 2011. Defense counsel made the following statement when describing the plea agreement to the trial court: "It is agreed that he will be sentenced to a stipulated upper term of three years. Given the change [due to] AB 109 after October 1st, he will be sentenced -- he will -- it is my belief that he will serve this in local time, that is my belief, and I think that's [the prosecutor's] belief as well, however, he doesn't want to stipulate to that, but -- [i]t's my understanding[.]"
The prosecutor replied: "My position is because AB109 is so new, my understanding is that at the time of sentencing the defendant will be serving a prison sentence locally, however, I am not stipulating that that is necessarily correct, but will -- my offer is a three year term."
Defense counsel then stated: "If he was not eligible, then it would be an illegal sentence anyway. So I have advised [defendant] that he will be serving locally, and for some reason he wasn't, that would be a basis for him to withdraw his plea, that's where we are at right now . . . . [¶] . . . [¶] Basically, we all agree that based on the information we have, he should serve his sentence locally. It will be a prison sentence, three years. [The prosecutor] just doesn't -- wants ...