MENETREZ J.
*68*203In the published portion of this opinion, we hold that the amendments to section 12022.5, subdivision (c), and section 12022.53, subdivision (h), of the Penal Code1 granting the trial court discretion to strike firearm enhancements apply retroactively to cases not yet final at the time the amendments took effect. We further hold that the recent amendments to section 667, subdivision (a), and section 1385, subdivision (b), also apply retroactively to cases not yet final when those amendments took effect.
A jury convicted Richard Lorenzo Zamora of one count of attempted murder (§§ 664, 187), one count of assault with a deadly weapon, to wit, a handgun (§ 245, subd. (a)(1)), one count of robbery (§ 211), one count of criminal threats (§ 422), and two counts of being a felon in possession of a firearm (§ 29800, subd. (a)(1)). The jury further found true enhancement allegations for personally and intentionally discharging a firearm and proximately causing great bodily injury during the attempted murder ( § 12022.53, subd. (d) ), personal infliction of great bodily injury during the assault with a firearm (§ 12022.7, subd. (a)), and personal use of a firearm during the assault with a deadly weapon, robbery, and making criminal threats ( § 12022.5, subd. (a) ). In a bifurcated proceeding, the court found true that Zamora had served four prior prison terms (§ 667.5, subd. (b)), had been convicted of three prior serious felonies (§ 667, subd. (a)), and had suffered three prior serious or violent felony convictions under the "Three Strikes" law (§§ 1170.12, subd.(c)(2), 667, subds. (c) & (e)(2)(A), 667.5, subd. (b)). Two of the prison priors were reduced to misdemeanors and stricken, and a third was stricken for falling outside of the five-year rule. Zamora was sentenced to state prison for an aggregate term of 20 years, plus 100 years to life.
Zamora appeals the attempted murder conviction, contending that there is insufficient evidence to support the finding that he had the specific intent to kill. He further contends that one of the serious felony priors must be stricken and that the case should be remanded for resentencing under Senate Bills Nos. 620 and 1393 to permit the trial court to exercise its newly granted discretion as to whether to strike the firearm enhancements and to strike or dismiss the remaining serious felony conviction enhancements. The People concede the points about the serious felony prior and the enhancements. We affirm the conviction and remand for resentencing.
*204BACKGROUND
On the morning of May 22, 2017, Phillip K. returned to his apartment after shopping for groceries to find Zamora at his apartment with an unidentified male companion. Jasmine R. also was in the apartment at the time. The apartment Phillip lived in was located in a converted garage behind the main house on the property he owned. Zamora and Phillip were acquainted and had smoked methamphetamine together.
*69While in Phillip's apartment, Zamora demanded that Phillip return a broken methamphetamine pipe that Zamora owned and believed Phillip had borrowed and was hiding from Zamora. Phillip told Zamora that he did not have the pipe. Phillip turned toward Zamora after placing his groceries on the counter and for the first time noticed that Zamora was holding a gun. Zamora warned, "I'll come back and put a bullet in you if you don't find the pipe." The threat was directed at both Phillip and Zamora's companion. In that moment, Phillip did not believe that Zamora would follow through with the threat. Zamora exited the residence for approximately five minutes. Before leaving, he threatened, "I'm going to go outside, and when I come back in, you better have my meth pipe."
When Zamora returned, he pointed the gun at Phillip and took Phillip's cell phone, which was lying on the coffee table. Phillip asked Zamora to give back his phone, but Zamora refused to return it. With the gun pointed at him, Phillip took Zamora's earlier threat more seriously and was afraid to take the phone back. Once Zamora had Phillip's phone, he exited the apartment and left the property. The encounter lasted approximately 25 to 30 minutes.
Later that night, when Phillip was once again returning to his apartment, he was struck in the head with a gun while opening the front door. He turned around and saw Zamora holding a gun. Phillip cursed at Zamora, retreated into the apartment, and grabbed the door handle in an attempt to close the door to keep Zamora out. Phillip began pushing Zamora out of the apartment by exerting force with the door and his hands. Although Zamora pushed back, Phillip successfully pushed Zamora out of the apartment within approximately five seconds and locked the door. While still standing partially in front of the door, Phillip then turned toward Jasmine, who was in the apartment at the time, and told her to leave the room. Phillip was approximately one foot away from the door and facing it, though at an angle. Five seconds later, a gunshot came through the door, shattered a glass pane on the door, and hit Phillip in his left upper thigh. The door is a dual pane glass door with dustless blinds between the panes. The lights were not on inside or outside of the apartment. Under those lighting conditions, Phillip did not believe that someone standing outside could see his location inside the house.
*205At approximately 9:30 p.m. that night, Riverside police officers responded to a call that there had been a shooting at Phillip's residence and that the shooter had fled on foot. A single .40-caliber shell casing was found on the ground approximately seven feet away from the converted garage. An officer at the scene noted that there was a gunshot hole in the glass in the middle portion of the front door above the door handle. There was shattered glass on the ground inside the apartment. The bullet hole in the door was approximately one foot higher than the entry wound on Phillip's leg. An officer opined that the differential meant that the bullet had travelled in a downward trajectory.
Two witnesses were present at the scene and were interviewed by the officers. One of the witnesses, Gabriel M., said he witnessed a struggle between Phillip and Zamora at the door but did not see who shot Phillip because he was in the bathroom by that time. The female witness, Jasmine, did not provide the officers with any leads.
A police officer interviewed Phillip at the hospital later that night. Phillip did not identify the shooter and did not say anything about the earlier confrontation with Zamora. Phillip feared Zamora might retaliate against him or his family and friends because Zamora had previously told Phillip that he was from the Casa *70Blanca neighborhood, which Phillip associated as a neighborhood with "a lot of gangs." In a later interview with police at his home, Phillip identified Zamora as the shooter and disclosed what had transpired with Zamora earlier during the day of the shooting.
The bullet did not exit Phillip's leg and was not removed. By the time of trial, it rested under the skin in his rear thigh approximately six inches lower than the entry wound on the front of his leg. The bullet originally rested at a higher location and migrated downward. Phillip did not undergo surgery or need stitches to close the entry wound. Phillip further suffered a "little" bump on his head from being hit by the gun and had marks on his chest from the shattered glass.
Three days after the shooting, Zamora was arrested. Police tracked the cell phone Zamora had taken from Phillip. When arrested, Zamora was in possession of Phillip's phone, a loaded .40-caliber handgun, an additional magazine for the gun, and a box of .40-caliber ammunition, which was the same brand as the shell casing found at the scene.
*206DISCUSSION
A. Attempted Murder**
B. Sentence Enhancements
The trial court found true that Zamora had three prior convictions of serious felonies under section 667, subdivision (a). Zamora received a five-year consecutive sentence for each prior serious felony conviction.
For count 1 (attempted murder), the jury found true an enhancement allegation for personally and intentionally discharging a firearm proximately causing great bodily injury. ( § 12022.53, subd. (d).) Zamora received a 25 years to life sentence for this enhancement. For counts 2 (assault with a deadly weapon), 3 (robbery), and 4 (criminal threats), the jury found true enhancement allegations for personally using a firearm in the commission of the offense. ( § 12022.5, subd. (a).) The sentences for the personal use enhancements for counts 2 and 4 were stayed. For the personal use enhancement for count 3, Zamora received a four-year sentence.
1. Serious Felony Enhancement
The court found that Zamora had three prior serious felonies under section 667, subdivision (a): a 2004 robbery conviction, a 2004 conviction for actively participating in a criminal street gang, and a 2012 conviction for actively participating in a criminal street gang. The 2004 convictions were charged together under the same case number and adjudicated in the same proceeding. But the trial court imposed two consecutive five-year terms for those two offenses. As the parties correctly agree, the trial court erred in doing so because each such five-year term can be imposed only when the "charges [were] brought and tried separately," and the 2004 offenses were brought and tried together. (§ 667, subd. (a)(1); In re Harris (1989) 49 Cal.3d 131, 136, 260 Cal.Rptr. 288, 775 P.2d 1057 [" 'brought and tried separately' " means "that the underlying proceedings must have been formally distinct, from filing to adjudication of guilt"].) We therefore strike one of the five-year terms.
2. Senate Bill No. 620-Now Discretionary to Strike Firearm Enhancements
Senate Bill No. 620 amended section 12022.5, subdivision (c), and section 12022.53, subdivision (h), as of January 1, *712018, to provide that *207"[t]he court may, in the interest of justice pursuant to [s]ection 1385 and at the time of sentencing, strike or dismiss an enhancement" otherwise required to be imposed by section 12022.5 or section 12022.53. Before the enactment, at the time of Zamora's sentencing in 2017, the enhancements were mandatory, and the trial court did not have the discretion to strike or dismiss them. (Former §§ 12022.5, subd. (c), 12022.53, subd. (h).) Zamora contends that the change in law applies retroactively to defendants like him whose sentences were not final at the time Senate Bill No. 620 became effective. The People concede the point. We agree with the People and the other appellate courts that have addressed this issue. (See People v. Chavez (2018) 22 Cal.App.5th 663, 707-708, 231 Cal.Rptr.3d 20 ; People v. Arredondo (2018) 21 Cal.App.5th 493, 506-507, 230 Cal.Rptr.3d 380 ( Arredondo ); People v. Vela (2018) 21 Cal.App.5th 1099, 1113-1114, 230 Cal.Rptr.3d 880 ; People v. Woods (2018) 19 Cal.App.5th 1080, 1090-1091, 228 Cal.Rptr.3d 318.)
When the Legislature has not made its intent clear about whether a criminal statute operates prospectively or retroactively, we presume that the statute applies prospectively. (§ 3; People v. Brown (2012) 54 Cal.4th 314, 319-320, 142 Cal.Rptr.3d 824, 278 P.3d 1182.) When the amendment lessens the punishment or vests in the trial court the discretion to impose a lesser punishment, as Senate Bill No. 620 does, however, we can infer that "the Legislature must have intended that the new statute imposing the new lighter penalty now deemed to be sufficient should apply to every case to which it constitutionally could apply"-i.e., every nonfinal case on appeal. ( In re Estrada (1965) 63 Cal.2d 740, 745, 48 Cal.Rptr. 172, 408 P.2d 948 ( Estrada ); People v. Superior Court (Lara ) (2018) 4 Cal.5th 299, 308, fn. 5, 228 Cal.Rptr.3d 394, 410 P.3d 22 [the presumption of retroactivity to nonfinal cases created by Estrada means "that ordinarily it is reasonable to infer for purposes of statutory construction the Legislature intended a reduction in punishment to apply retroactively"]; People v. Francis (1969) 71 Cal.2d 66, 75-76, 75 Cal.Rptr. 199, 450 P.2d 591 ( Francis ) [applying Estrada to an amendment allowing the trial court to exercise its discretion to impose a lesser penalty].)
Neither section 12022.5 nor section 12022.53 contains a saving clause, nor is there any express indication that they apply prospectively or retroactively. Nor are there other indicia of legislative intent concerning their application to cases not yet final on appeal. (See Stats. 2017, ch. 682, § 2, eff. Jan. 1, 2018.) Because the effect of the amendments is to grant the trial court discretion not to impose penalties for these enhancements, we can infer that the Legislature intended that offenders subject to the firearm enhancements in section 12022.5, subdivision (c), and section 12022.53, subdivision (h), be afforded the benefit of the amendments. ( Francis , supra , 71 Cal.2d at p. 76, 75 Cal.Rptr. 199, 450 P.2d 591.) This inference is bolstered by the fact that both section 12022.5, subdivision (c), and section 12022.53, subdivision (h), provide that the newly granted *208discretion to strike or dismiss an enhancement under these subdivisions "applies to any resentencing that may occur pursuant to any other law." We agree with Arredondo , supra , 21 Cal.App.5th at page 507, 230 Cal.Rptr.3d 380, that, "[b]y its express terms, this provision extends the benefits of Senate Bill [No.] 620 to defendants who have exhausted their rights to appeal and for whom a judgment of conviction has been entered but who have obtained collateral relief by way of a state or federal habeas proceeding." Like Arredondo , we too cannot perceive a circumstance in which the Legislature would grant relief to *72a defendant whose judgment is final and not provide that same relief to defendants whose judgments are not yet final on appeal. ( Ibid. ) It would be inefficient to deny relief immediately while on direct appeal but to afford that relief to a successful habeas litigant later. We thus conclude that the Legislature intended section 12022.5, subdivision (c), and section 12022.53, subdivision (h), to apply retroactively to all cases not final when those provisions took effect.
We remand so that the trial court can exercise its discretion as to whether to strike the firearm enhancements.
3. Senate Bill No. 1393-Now Discretionary to Strike Serious Felony Enhancements
Zamora argues, the People agree, and we concur that the same analysis applies to the more recently enacted Senate Bill No. 1393. Senate Bill No. 1393 amended section 667, subdivision (a), and section 1385, subdivision (b), as of January 1, 2019, to allow a court to strike or dismiss a prior serious felony conviction for sentencing purposes. (Stats. 2018, ch. 1013, § 2, eff. Jan. 1, 2019.) As with the firearm enhancements, at the time of Zamora's sentencing, the trial court did not have authority "to strike any prior conviction of a serious felony for purposes of enhancement of a sentence under [s]ection 667." (Former § 1385, subd. (b).) Instead, the trial court was required to impose a five-year enhancement for each prior serious felony conviction. (Former § 667, subd. (a)(1).) This change in law also applies retroactively to those like Zamora whose sentences were not final when Senate Bill No. 1393 became effective. (See People v. Garcia (2018) 28 Cal.App.5th 961, 971-973, 239 Cal.Rptr.3d 558.) We therefore remand so that the trial court can exercise its newly gained discretion as to whether to dismiss or strike the two remaining serious felony enhancements for sentencing purposes.
DISPOSITION
The sentence is vacated and the matter is remanded to the trial court to: (1) strike one of the five-year enhancements imposed under section 667, *209subdivision (a), for the serious felony convictions that occurred in 2004; (2) exercise its discretion under section 12022.5, subdivision (c), and section 12022.53, subdivision (h), to determine whether to strike the firearm enhancements imposed for counts 1 through 4; and (3) exercise its discretion under section 667, subdivision (a), and section 1385, subdivision (b), to determine whether to dismiss or strike the two remaining serious felony conviction enhancements. The trial court shall resentence Zamora accordingly. In all other respects, the judgment is affirmed.
We concur:
MILLER, Acting, P. J.
SLOUGH, J.
All further statutory references are to the Penal Code unless otherwise indicated.
See footnote *, ante .