After pleading no contest to aggravated battery with a firearm (reduced from second-degree murder) and attempted manslaughter (reduced from attempted second-degree murder), Corey Miles appeals the denial of his dispositive motion to dismiss, which asserted “Stand Your Ground” immunity under section 776.032, Florida Statutes (2010). Section 776.032 provides immunity from prosecution under three separate statutory defenses-sections 776.012, 776.013, and 776.031. The trial court found that although Miles acted in self-defense, he was not entitled to immunity from prosecution under section . 776.013(3) because he was engaged in unlawful activity (i.e., carrying a concealed firearm). Miles argues on appeal that the “unlawful activity” prohibition found in section 776.013(3) does not negate immunity under section 776.012. Since the trial court’s ruling, our four sister courts have weighed in on this issue consistent with Miles’ position. We now do the same.
The State charged Miles by information with second-degree murder with a firearm, attempted second-degree murder with a firearm, carrying a concealed weapon, and possession of a firearm by a convicted felon for an incident that occurred in October 2010.- Miles filed a motion to dismiss all four counts of the information, asserting immunity under section 776.032, Florida Statutes. After an evidentiary hearing, the trial court denied Miles’ motion to dismiss. Although the court found by a preponderance of evidence that Miles acted in self-defense, a finding that the State does not challenge, it concluded that he was not entitled to immunity because he was engaged in the unlawful activity of carrying a concealed weapon or firearm at the time. Miles later entered into a negotiated plea to reduced charges and reserved the right to appeal the trial court’s ruling on his motion to dismiss.
In concluding that Miles was not entitled to immunity because he was engaged in the unlawful activity of carrying a concealed firearm, the trial court cited to sec*171tion 776.013(3), Florida Statutes, and Dorsey v. State, 74 So.3d 521 (Fla. 4th DCA 2011) (“Dorsey I”). Section 776.013(3), Florida Statutes (2010), states:
A person who is not engaged in an unlawful activity and who is attacked in any other place where he or she has a right to be has no duty to retreat and has the right to stand his or her ground and meet force with force, including deadly force if he or she reasonably believes it is necessary to do so to prevent death or great bodily harm to himself or herself or another or to prevent the commission of a forcible felony.
Dorsey I held that under section 776.013(3), when a defendant is engaged in an unlawful activity, such as possession of a firearm by a convicted felon, the common law duty to retreat still applies to self-defense rather than the Stand Your Ground law. Id. at 527. In a footnote, the court noted that its opinion should not be construed as limiting a convicted felon’s right to raise a defense of necessity to an unlawful possession of a firearm charge in an appropriate case, as exemplified in Marrero v. State, 516 So.2d 1052, 1054 (Fla. 3d DCA 1987). Dorsey I, 74 So.3d at 527 n. 2.
Since the trial court’s ruling in this case, our four sister courts have each addressed this issue either in the context of asserting immunity from prosecution or in the context of jury instructions at trial. The Second, Third, and Fourth District Courts of Appeal have held that although a defendant engaged in unlawful activity could not claim immunity under section 776.013(3), he or she could assert immunity under section 776.012 prior'to 20141 because that statute had no “unlawful activity” exception. See Hill v. State, 143 So.3d 981, 986 (Fla. 4th DCA 2014) (en banc); Pages v. Seliman-Tapia, 134 So.3d 536, 539 (Fla. 3d DCA 2014) (affirming dismissal of civil case based upon section 776.012 immunity); Little v. State, 111 So.3d 214, 222 (Fla. 2d DCA 2013) (reversing denial of motion to dismiss based on section 776.012 immunity, regardless of alleged unlawful activity). The First District has also stated as much in obiter dictum. Brown v. State, 135 So.3d 1160, 1161-62 (Fla. 1st DCA 2014) (noting that statutory immunity under section 776.032(1), based on sections 776.012, “is potentially available even to a person engaged in an unlawful activity at the time”); see also State v. Wonder, 39 Fla. L. Weekly D1695 (Fla. 4th DCA Aug.13, 2014) (noting in dictum that sections 776.012 and 776.013 provide alternate forms of immunity; since defendant did not seek immunity under section 776.013, trial court erroneously considered whether defendant was engaged in unlawful activity at time).2
Consistent with our sister courts, we also conclude that under the prior Stand Your Ground law, a defendant could assert immunity under section 776.012 even if he or she was engaged in an unlawful act at *172the time. Accordingly, we reverse and remand for discharge on the counts subject to immunity — second-degree murder (reduced to manslaughter) and attempted second-degree murder (reduced to aggravated battery). However, section 776.032 immunity does not apply to the remaining charged counts of carrying a concealed weapon and possession of a firearm by a convicted felon. Instead, the State may reinstate those counts on remand, and if the case proceeds to trial, Miles may assert the affirmative defense of necessity if applicable.
REVERSED; REMANDED WITH INSTRUCTIONS.
TORPY, C.J., and SWANSON, R„ Associate Judge, concur.. The Florida Legislature has rectified the problem presented in this case by amending section 776.012, effective June 20, 2014, to grant immunity only to a person “not engaged in criminal activity.” § 776.012, Fla. Stat. (2014). As noted in Dorsey v. State, 149 So.3d 144, 146 n. 2 (Fla. 4th DCA 2014), reh’g denied, (Nov. 3, 2014) ("Dorsey II ”), and Rios v. State, 143 So.3d 1167 (Fla. 4th DCA 2014), however, this substantive change in the law does not affect the instant case.
. In the related context of asserting the Stand Your Ground defense at trial, additional cases have found error in instructing the jury that a defendant had a duty to retreat before defending himself if he was engaged in unlawful activity at the time because the unlawful activity exception did not apply to section 776.012. Dorsey II, 149 So.3d 144; Garrett v. State, 148 So.3d 466, 471 (Fla. 1st DCA 2014); Rios, 143 So.3d 1167.