
723 N.W.2d 644 (2006)
15 Neb. App. 169
STATE of Nebraska, appellee,
v.
Rashad A. McKAY, appellant.
No. A-05-558.
Court of Appeals of Nebraska.
March 28, 2006.
*646 W. Patrick Dunn, Columbus, for appellant.
Jon Bruning, Attorney General, and James D. Smith, Lincoln, for appellee.
INBODY, Chief Judge, and IRWIN and CASSEL, Judges.
IRWIN, Judge.

I. INTRODUCTION
Rashad A. McKay appeals his conviction on a charge of assault by a confined person. On appeal, McKay challenges the district court's allowing the State to reopen its case after resting and the court's refusal to give the jury a lesser-included offense instruction on third degree assault. We find no abuse of discretion by the court in allowing the State to reopen its case, and we conclude that a lesser-included offense instruction was not warranted, because there was no rational basis for the jury to acquit McKay of the greater offense and convict him of the lesser offense. Accordingly, we affirm.

II. BACKGROUND
The events giving rise to this case occurred at the Douglas County Correctional Facility in Omaha, Nebraska, on June 2, 2004. On that date, McKay and two other men, Sterling McKoy and Barry Swindle, were in the bullpen area of the correctional facility waiting to be transported back to the housing units after separate court appearances. The three were escorted from the bullpen area to the housing units by a correctional officer, Joyce Brooks. Brooks testified that the three were walking "single file, one behind the other"; that Swindle was in front of McKoy, who was in front of McKay; and that Brooks was walking behind McKay.
According to Brooks, the group had to climb stairs to get to the third floor of the housing unit. Brooks testified: "Once we reached the third floor, me and . . . McKay were still on the stairwell and . . . Swindle was hit by . . . McKoy. At this time . . . McKay came up the stairs and he proceeded to assist . . . McKoy in hitting Inmate Swindle." Brooks further testified that McKay struck Swindle with a closed fist "several times," that Swindle fell to the ground, and that while Swindle was on the ground, McKay "continued to hit him" and kicked him. Brooks testified that she "pulled [McKay] off" Swindle but that when she attempted to get control of McKoy, McKay "went back over to Inmate Swindle" and continued "hitting him."
On September 22, 2004, an information was filed charging McKay with assault by a confined person, a violation of Neb.Rev. Stat. § 28-932(1) (Cum.Supp.2004). On October 12, McKay filed a written waiver of appearance and plea of not guilty. The case was tried before a jury on February 28 and March 1, 2005.
After presenting testimony from Brooks and Swindle, the State rested its case. McKay moved for discharge, arguing that the State failed to present any evidence that he was "legally" confined at the time of the incident  an element of the offense. See § 28-932(1). The court commented that the State needed to show "how he's there, how it is not by mistake or some other process that he is there." The court further commented that "[t]o say that a correctional guard can testify to the legality of his detainment is a stretch" and that the State had not carried its burden. Nonetheless, the court granted the State leave to research the issue overnight and adjourned for the day.
*647 The next day, the State argued that the testimony of Brooks was sufficient to demonstrate McKay was legally confined at the time of the incident, that the issue of "legal" confinement was a question for the jury, and that in the alternative, the court should either allow the State to reopen its case and present additional evidence on the issue or give the jury an instruction on third degree assault as a lesser-included offense to the charged offense of assault by a confined person. The court again commented that the State had "wholly failed to show legal confinement," but the court granted the State leave to reopen its case on the issue.
The State then reopened its case and offered a certified copy of a judgment from the U.S. District Court for the District of Nebraska showing that on June 2, 2004, the date of the incident herein, McKay was found guilty in federal court of conspiracy to possess with intent to distribute crack cocaine. The State then rested its case again.
The court held a jury instruction conference prior to McKay's presenting his defense. Before McKay called his first witness, he requested that the court add a lesser-included offense instruction which would instruct the jury that third degree assault is a lesser-included offense to the charged offense of assault by a confined person. McKay argued that the jury could find him guilty of third degree assault "if they cannot find the element of legally confined." The court at that time stated, "I agree with you. It would be a lesser-included [offense]." The court indicated that the issue would be discussed further.
McKay presented testimony by both McKoy and himself suggesting that McKay did not strike Swindle and that McKay only attempted to break up the fight between McKoy and Swindle. McKoy testified that Swindle had elbowed McKoy to start the altercation, that McKoy had punched Swindle, and that McKay had tried to break up the fight. McKoy testified that he never saw McKay hit or kick Swindle. McKay testified that he tried to break up the fight and that he tried to help Brooks stop the fight because she was not able to stop the fight by herself. McKay testified that he never struck or kicked Swindle. McKay then rested his case.
The court held another jury instruction conference after the close of all evidence. McKay again requested an instruction on third degree assault as a lesser-included offense to the charged offense of assault by a confined person. The State objected to the request and argued that because of the certified copy of McKay's federal court conviction, there was no rational basis for the jury to acquit McKay of the greater offense but convict him of the lesser offense. The State further pointed out McKay had testified that prior to the incident, he had just returned from court and had been convicted. The court denied McKay's request for the instruction.
On March 2, 2005, the court entered an order reflecting that the jury had returned a unanimous verdict of guilty. On April 1, the court sentenced McKay to 3 to 5 years' imprisonment, to be served consecutively to any other term being served. This appeal followed.

III. ASSIGNMENTS OF ERROR
McKay's two assignments of error on appeal are that the district court erred in allowing the State to reopen its case and in refusing to instruct the jury on third degree assault as a lesser-included offense to the charged offense of assault by a confined person.


*648 IV. ANALYSIS

1. REOPENING CASE
McKay challenges the district court's granting of the State's motion to withdraw its rest and introduce additional evidence on the issue of whether McKay was legally confined at the time of the incident. McKay argues that it was an abuse of discretion for the court to allow the State to adduce additional evidence on an issue which the court had concluded the State had failed to prove in its case prior to resting. We conclude that on the facts of this case, it was not an abuse of discretion for the court to allow the State to withdraw its rest.
The Nebraska Supreme Court has held: "`Even in criminal prosecutions the withdrawal of a rest in a trial on the merits is within the discretion of the trial court.'" State v. Thomas, 236 Neb. 84, 94, 459 N.W.2d 204, 211 (1990) (quoting State v. Putnam, 178 Neb. 445, 133 N.W.2d 605 (1965)), disapproved on other grounds, State v. Boslau, 258 Neb. 39, 601 N.W.2d 769 (1999). Accord State v. Vejvoda, 231 Neb. 668, 438 N.W.2d 461 (1989). In State v. Thomas, supra, the State adduced testimony from witnesses and documentary evidence and rested its case. The defendant then moved for a directed verdict on the issue of the statute of limitations, because the State had not adduced any evidence demonstrating that any exception to the otherwise applicable statute applied. The court granted the State's motion to withdraw its rest and permitted the State to adduce evidence on whether the defendant fit within an exception to the otherwise applicable statute of limitations. On appeal, the Supreme Court found no abuse of discretion by the trial court in permitting the State to withdraw its rest.
In State v. Gray, 8 Neb.App. 973, 606 N.W.2d 478 (2000), overruled on other grounds, State v. Nelson, 262 Neb. 896, 636 N.W.2d 620 (2001), this court found an abuse of discretion by the district court in allowing the State to withdraw its rest and adduce additional evidence. Important to this court's decision in State v. Gray, however, was the fact that after the State had rested its case in an enhancement proceeding, the district court, on its own motion, assessed the State's evidence and then notified both the State and a judge presiding over a different enhancement proceeding involving the same defendant that the State's evidence appeared to be insufficient. The district court, in both cases, then allowed the State to withdraw its rest and adduce additional evidence. This court, in finding an abuse of discretion, specifically noted that the district court had advised the State of insufficiencies in its proof and "allowed the State to put in more evidence to attempt to plug the gaps in its proof." Id. at 993, 606 N.W.2d at 495. This court's finding of an abuse of discretion demonstrated concern about the district court's failure to maintain an appearance of impartiality and becoming "an advocate for the State's need to put in more and better evidence, rather than simply deciding whether the evidence adduced" was sufficient. Id. at 995, 606 N.W.2d at 497. Also important was the underlying conclusion that the evidence adduced by the State prior to resting was, in fact, insufficient.
We find the facts of the present case to be more comparable to the facts in State v. Thomas, supra, and to be distinguishable from the facts in State v. Gray, supra. In the present case, the district court did not become an advocate for the State, did not raise on the court's own motion any alleged insufficiency of the State's evidence, and did not raise on the court's own motion the issue of the sufficiency of the evidence. Rather, the court was presented with the issue as raised by McKay, and *649 the court decided that issue. Further, as our analysis below demonstrates, the evidence adduced by the State prior to resting was not clearly insufficient to demonstrate legal confinement; the district court's suggestions to the contrary appeared to be based on the court's misunderstanding of the legal requirements for a showing of legal confinement  a matter we further discuss below. As such, the present case is not even a case where allowing the State to withdraw its rest actually resulted in allowing the State to fill gaps in its proof; as our analysis below demonstrates, the State's proof of legal confinement was sufficient prior to its initial rest. For these reasons, we do not find an abuse of discretion by the district court in allowing the State to withdraw its rest. This assigned error is without merit.

2. LESSER-INCLUDED OFFENSE INSTRUCTION
McKay also asserts that the district court erred in refusing to instruct the jury on third degree assault as a lesser-included offense to the charged offense of assault by a confined person. McKay argues both that third degree assault is a lesser-included offense and that the evidence was such that the jury could rationally have acquitted him of the greater offense and convicted him of the lesser offense. We disagree.
The test adopted by the Nebraska Supreme Court to determine whether a lesser-included offense instruction should be given involves two parts. See, State v. Smith, 267 Neb. 917, 678 N.W.2d 733 (2004); State v. Williams, 243 Neb. 959, 503 N.W.2d 561 (1993). The court must first determine whether the alleged offense is a lesser-included offense of another. See id. The test for making this determination is a statutory elements test in which a court looks to the statutory elements of each crime rather than the particular facts of a specific case. State v. Smith, supra. See State v. Williams, supra. In order to be a lesser-included offense, the elements of the lesser offense must be such that it is impossible to commit the greater offense without at the same time having committed the lesser offense. Id. Otherwise stated, a lesser-included offense is one which is fully embraced in the higher offense. Id. Once it is determined that an offense is a lesser-included one, a court must examine the evidence to determine whether it justifies an instruction on the lesser-included offense by producing a rational basis for a verdict acquitting the defendant of the offense charged and convicting him of the lesser offense. Id.
There is no dispute in this case that the first part of the test is satisfied. The elements of assault by a confined person, the greater offense, and third degree assault, the lesser offense, are such that it is impossible to commit the greater offense without at the same time having committed the lesser offense. See Neb.Rev.Stat. § 28-310 (Reissue 1995) and § 28-932(1). The elements of the two offenses are identical, see id., except that assault by a confined person has the additional requirement that the defendant be "legally confined," § 28-932(1).
As such, the real issue in this case is whether the evidence produces a rational basis for a verdict acquitting McKay of the offense charged, assault by a confined person, and convicting him of the lesser offense, third degree assault. Stated differently, the issue is whether the evidence produces a rational basis for the jury to conclude that McKay, while committing an assault, was not legally confined at the time of the incident. We determine that the district court correctly found that there is not a rational basis for such a conclusion.
*650 McKay argues to this court, as he argued to the district court and as the district court apparently agreed, that the State was required to prove that his confinement at the time of the incident "had some legal basis  for instance, that it was the result of some order lawfully entered by a court of competent jurisdiction." Brief for appellant at 6. Although the district court apparently agreed with this assertion, we find that "legal" confinement, as required by § 28-932(1), requires a showing that the defendant was technically in actual custody in a correctional facility and not that his confinement was substantively lawful.
As both parties note on appeal, the term "legally confined" is not defined in the statute. We agree with the State, however, that prior Nebraska Supreme Court interpretations of the meaning of legal confinement, as opposed to lawful confinement, are instructive and guide the outcome in this case. To that end, the Nebraska Supreme Court's analysis in State v. Reeves, 199 Neb. 725, 261 N.W.2d 110 (1978), is most illustrative. In State v. Reeves, the court was presented with the meaning of the term "legal custody" in Neb.Rev.Stat. § 28-736 (Reissue 1975), concerning escape from custody. The question presented was whether the defendant had been in legal custody when placed under arrest pursuant to a search warrant that was subsequently suppressed. The defendant argued that because the warrant was suppressed, his arrest and law enforcement's custody of him were not "legal."
The Nebraska Supreme Court explicitly recognized the difference between the terms "legal" and "lawful." In interpreting § 28-736, the court noted that the statute did not require "lawful" custody or a "lawful" arrest, but, rather, required only that the defendant be in "legal" custody. The court noted:
Although the distinction between the terms "legal" and "lawful" is frequently clouded and the terms are often used interchangeably, there is in fact a distinction of some importance. This distinction is set forth in the narrative following the definition of "lawful" as stated in Black's Law Dictionary (4th Ed.), p. 1032. It reads as follows: "The principal distinction between the terms `lawful' and `legal' is that the former contemplates the substance of law, the latter the form of law. To say of an act that it is `lawful' implies that it is authorized, sanctioned, or at any rate not forbidden, by law. To say that it is `legal' implies that it is done or performed in accordance with the forms and usages of law, or in a technical manner."
State v. Reeves, 199 Neb. at 727-28, 261 N.W.2d at 112-13.
The Nebraska Supreme Court concluded that the term "legal custody" in § 28-736 concerned only whether the defendant was, technically, placed under arrest and in the custody of law enforcement. See State v. Reeves, supra. The defendant's guilt or innocence of the charge for which he was being held, substantively speaking, was immaterial. See id. See, also, Connelly v. Department of Motor Vehicles, 9 Neb.App. 708, 713, 618 N.W.2d 715, 719 (2000) (quoting Black's Law Dictionary (7th ed.1999), which defined arrest as including "`lawful arrest'" where person is taken into "`legal custody'"). This distinction is important even though the terms have, on occasion, been unclearly used interchangeably. See, e.g., State v. Auman, 232 Neb. 341, 344, 440 N.W.2d 254, 257 (1989) (suggesting that § 28-932 is intended to discourage "lawfully" confined person from injuring another).
*651 In light of the Nebraska Supreme Court's discussion in State v. Reeves, supra, of the important distinction between the terms "legal" and "lawful" in statutes, we are obliged to conclude that § 28-932(1) does not require the State to demonstrate "lawful" confinement, substantively, but, rather, requires the State to show only "legal" confinement, technically. The State's evidence adduced prior to its initial rest clearly demonstrated that at the time of the incident, McKay was in custody at the Douglas County Correctional Center, was being transported from a bullpen area to a housing area, and was being escorted by a corrections officer. This evidence was clearly sufficient to demonstrate that McKay was, technically, in custody of law enforcement at the time of the incident. The State was not required to show that this custody was pursuant to any valid court order or judgment. The evidence adduced after the State withdrew its rest only further supported the fact that McKay was in legal custody at the time of the incident.
Turning, then, to the question of whether the evidence presented a rational basis for the jury to acquit McKay of the greater offense of assault by a confined person and to convict McKay of the lesser offense of third degree assault, we must determine whether there was any rational basis for the jury to conclude that McKay was not legally confined at the time of the incident. McKay's arguments on this issue, both before this court and in the district court, all turn on the substantive issue of whether the jury might have concluded that the State did not sufficiently prove that his confinement was lawful or pursuant to a valid court order or judgment. As noted, the State was not required to prove that.
Our review of the evidence leads us to determine that the district court properly concluded that there was no rational basis for the jury to find that McKay was not in legal custody. The evidence presented by the State showed that the incident occurred in a correctional facility while McKay, McKoy, and Swindle were being transported back to their housing units after they had made court appearances and while being escorted by a corrections officer. McKay, McKoy, and Swindle each similarly testified that they were being transported from the bullpen area to their housing units. There was absolutely no evidence presented upon which the jury might have concluded that McKay was not in legal custody at the time of the incident. There was no rational basis for the jury to find that the additional element of legal confinement was not present. As such, there was no rational basis for a finding acquitting McKay of the greater offense but convicting him of the lesser offense. This assignment of error is without merit.

V. CONCLUSION
We find no merit to McKay's assignments of error. The district court did not abuse its discretion in allowing the State to withdraw its rest and adduce additional evidence, and the district court correctly denied McKay's request for a lesser-included offense instruction. As such, the judgment of the district court is affirmed.
AFFIRMED.
