
977 P.2d 12 (1999)
95 Wash.App. 328
STATE of Washington, Respondent,
v.
Francisco HERRERA, Appellant.
No. 17574-0-III.
Court of Appeals of Washington, Division 3, Panel Two.
April 29, 1999.
*13 Linus Johnson, Walla Walla, for Appellant.
James L. Nagle, Jill M. Peitersen, Prosecuting Attorney's Office, Walla Walla, for Respondent.
KATO, J.
Francisco Herrera, a juvenile, appeals his conviction for third degree assault. He contends the court's decision was improper because he was charged with first degree robbery, not assault. We agree and reverse.
Michael Mueller, night manager of a grocery store in Walla Walla, saw Mr. Herrera in the store at about 10:45 p.m. December 21, 1997. He noticed the youth was holding his hands palms up, facing inward, and there were bulges in each of his sleeves. Mr. Mueller followed Mr. Herrera out of the store and asked if the boy had forgotten to pay for anything. Mr. Herrera answered "No" and tried to run away.
Mr. Mueller grabbed the youth from behind and put a "restraint hold" on him. A struggle ensued, and a beer bottle fell from Mr. Herrera's sleeve. An open, lock-blade knife also fell to the ground. Mr. Herrera did not display the knife or threaten to use it, and he did not even have it in his hand. Mr. Herrera did not use force or threat of violence to retain the stolen property, and the appearance of the knife was the "result of the struggle, the pushing, pulling and falling of these two individuals during the incident."
Mr. Herrera was arrested and charged with second degree robbery. An amended information later charged him with first degree robbery. After a trial to the bench, the court concluded there was no robbery inside or outside the store. However, the court found Mr. Herrera guilty of third degree theft and third degree assault. The State then entered a second amended information charging Mr. Herrera with third degree theft and third degree assault. Mr. Herrera appeals the assault conviction.
The dispositive issue is whether it was improper for the court to find Mr. Herrera guilty of third degree assault when he was charged with first degree robbery. Criminal defendants generally may be convicted only of crimes with which they have been charged. State v. Irizarry, 111 Wash.2d 591, 592, 763 P.2d 432 (1988). However, one statutory exception to this rule is that a defendant may be convicted of a lesser included offense. RCW 10.61.006; see State v. Berlin, 133 Wash.2d 541, 545, 947 P.2d 700 (1997). A two-part test determines whether an offense is lesser included: "first, each of the elements of the lesser offense must be a necessary element of the offense charged; second, the evidence in the case must support an inference that the lesser crime was committed." Berlin, 133 Wash.2d at 548, 947 P.2d 700 (reaffirming State v. Workman, 90 Wash.2d 443, 447-48, 584 P.2d 382 (1978)).
There is authority in Washington that a trial court may sua sponte amend the charges against a defendant when the amended charge is a lesser included offense. State v. Martinez, 76 Wash.App. 1, 6-8, 884 P.2d 3 (1994), review denied, 126 Wash.2d 1011, 892 P.2d 1089 (1995); State v. Falco, 59 Wash.App. 354, 356, 796 P.2d 796 (1990); see CrR 2.1(d) (court may permit information to be amended "at any time before verdict or finding if substantial rights of the defendant are not prejudiced"); but see State v. Kenney, 23 Wash.App. 220, 225-26, 595 P.2d 52 (1979). The question here, then, is whether third degree assault is a lesser included offense of first degree robbery.[1]
A person is guilty of first degree robbery if he commits robbery while armed with a deadly weapon, displays what appears to be a *14 deadly weapon, or inflicts bodily injury. RCW 9A.56.200(1). Robbery is defined as follows:
A person commits robbery when he unlawfully takes personal property from the person of another or in his presence against his will by the use or threatened use of immediate force, violence, or fear of injury to that person or his property or the person or property of anyone. Such force or fear must be used to obtain or retain possession of the property, or to prevent or overcome resistance to the taking; in either of which cases the degree of force is immaterial. Such taking constitutes robbery whenever it appears that, although the taking was fully completed without the knowledge of the person from whom taken, such knowledge was prevented by the use of force or fear.
RCW 9A.56.190.
A person is guilty of third degree assault if he or she:
(a) With intent to prevent or resist the execution of any lawful process or mandate of any court officer or the lawful apprehension or detention of himself or another person, assaults another; or
(b) Assaults a person employed as a transit operator or driver by a public or private transit company while that person is performing his or her official duties at the time of the assault; or
(c) Assaults a school bus driver employed by a school district or a private company under contract for transportation services with a school district while the driver is performing his or her official duties at the time of the assault; or
(d) With criminal negligence, causes bodily harm to another person by means of a weapon or other instrument or thing likely to produce bodily harm; or
(e) Assaults a fire fighter or other employee of a fire department, county fire marshal's office, county fire prevention bureau, or fire protection district who was performing his or her official duties at the time of the assault; or
(f) With criminal negligence, causes bodily harm accompanied by substantial pain that extends for a period sufficient to cause considerable suffering; or
(g) Assaults a law enforcement officer or other employee of a law enforcement agency who was performing his or her official duties at the time of the assault; or
(h) Assaults a nurse, physician, or health care provider who was performing his or her nursing or health care duties at the time of the assault.
RCW 9A.36.031(1).
Subsection (1)(a) (formerly RCW 9A.36.030) includes the assault[2] of a store employee who attempts to detain the person on suspicion of shoplifting. State v. Miller, 103 Wash.2d 792, 793-95, 698 P.2d 554 (1985). This section expressly requires a specific intent to prevent or resist apprehension or detention.
Applying the first part of the Workman/Berlin test, this method of committing third degree assault is a lesser included offense of robbery only if each of the elements of the lesser offense are a necessary element of the offense charged. A person commits robbery by using or threatening force to obtain or retain property, or to overcome the resistance to the taking. RCW 9A.56.190. It is not necessary that the person specifically intend to prevent or resist apprehension or detention, which is required for third degree assault under RCW 9A.36.031(1)(a). Therefore, because this element of third degree assault is not a necessary element of robbery, third degree assault is not a lesser included offense of robbery. The trial court erred in amending the charge and finding Mr. Herrera guilty of third degree assault. The conviction on that count of the information is reversed.
SCHULTHEIS, C.J., and BROWN, J., concur.
NOTES
[1]  Mr. Herrera concedes that third degree theft is a lesser included offense of first degree robbery.
[2]  Our conclusion makes it unnecessary to address the other issue Mr. Herrera raises on appeal.
