
508 N.W.2d 271 (1993)
244 Neb. 615
STATE of Nebraska, Appellee,
v.
Jack L. BEVERLIN, Jr., Appellant.
No. S-92-251.
Supreme Court of Nebraska.
November 24, 1993.
*272 Phillip G. Wright and John J. Maynard, of Quinn & Wright, Omaha, for appellant.
Don Stenberg, Atty. Gen., and Mark D. Starr, Lincoln, for appellee.
HASTINGS, C.J., and BOSLAUGH, CAPORALE, FAHRNBRUCH, and LANPHIER, JJ.
LANPHIER, Justice.
Defendant, Jack L. Beverlin, Jr., was convicted of first degree sexual assault in the district court for Douglas County, Nebraska. He was sentenced by the court without an evaluation to determine if he was a mentally disordered sex offender (MDSO), as required by Neb.Rev.Stat. § 29-2912 (Reissue 1989). While that sentence was on appeal, the district court sustained a motion for postconviction relief, ordered the first sentence vacated, and resentenced Beverlin following an MDSO evaluation. The appeal of the first sentence was dismissed at Beverlin's request. The second sentence was appealed. On appeal, the Nebraska Court of Appeals affirmed the conviction. We granted the State's petition for further review because of the jurisdictional question raised by the holding of the Court of Appeals.

BACKGROUND
After Beverlin entered a no contest plea to a charge of first degree forcible sexual assault, the district court found Beverlin guilty and subsequently sentenced him to 10 to 15 years' imprisonment. This first sentence was imposed without an evaluation of Beverlin to determine whether he was an MDSO, as required under § 29-2912.
Beverlin timely filed a notice of appeal. This first appeal was docketed as case No. A-91-1227. In January 1992, while the case was still pending in the appellate court, Beverlin filed a postconviction motion in the district court to vacate and set aside the first sentence on the ground that the court had imposed the sentence without the benefit of the statutorily required MDSO evaluation.
On February 3, 1992, the district court sustained Beverlin's postconviction motion and ordered a resentencing hearing as soon as the psychological evaluations were received. Beverlin moved for additional psychological examinations and, when denied, filed a motion for leave to withdraw his no contest plea. This motion was also denied. After an MDSO evaluation was performed on Beverlin, the district court found he was not an MDSO and resentenced him to 10 to 15 years' imprisonment.
Beverlin's previous counsel, the public defender, moved to dismiss the appeal of the first sentence, which motion was granted by the Court of Appeals. Beverlin's present counsel timely appealed the second sentence, case No. A-92-251, which is the matter before us.

JURISDICTION
The principal question is whether the jurisdiction of the case was removed to the appellate court when the first appeal was filed, precluding the district court from resentencing Beverlin. The Court of Appeals held that the district court retained jurisdiction to impose the second sentence because the first sentence was invalid, since it was imposed without the benefit of the statutorily required MDSO evaluation. This holding is not supported by prior case law of this court.
*273 In criminal cases, it is the sentence which is the judgment. State v. Spotted Elk, 227 Neb. 869, 420 N.W.2d 707 (1988). The Court of Appeals found that the first sentence was not a judgment which was appealable because it was imposed without receiving the psychological evaluations. It therefore concluded that under State v. Blankenship, 195 Neb. 329, 237 N.W.2d 868 (1976), the district court was able to impose the second sentence. State v. Beverlin, 3 NCA 717, 1993 WL 165349 (1993). However, although the sentence was imposed without the benefit of the MDSO determination, the judgment was not void, but voidable. See State ex rel. Casselman v. Macken, 194 Neb. 806, 235 N.W.2d 867 (1975).

DIVESTMENT OF JURISDICTION
This court has held that a district court is divested of subject matter jurisdiction over a particular case when an appeal of that case is perfected to an appellate court. Sports Courts of Omaha v. Meginnis, 242 Neb. 768, 497 N.W.2d 38 (1993); State v. Horr, 232 Neb. 380, 441 N.W.2d 139 (1989); State v. Spotted Elk, supra. Consequently, once Beverlin perfected his first appeal, the district court no longer had the authority to vacate the first sentence and resentence him. The Court of Appeals mistakenly relied upon Blankenship to create an unwarranted exception to the above-stated rule. "If a sentence is invalid, `it is of no effect and the court may then impose any sentence which could have been validly imposed in the first place.'" State v. Beverlin, 3 NCA at 719. The Court of Appeals interpreted this statement to mean that since it is the sentence which is the judgment, an invalid sentence is not a judgment which is appealable.
This interpretation is not warranted under the facts of Blankenship. In Blankenship, the district court determined, on its own motion, that the sentence it had originally imposed was invalid; vacated it; and imposed another. There was no notice of appeal filed until after the second sentence had been imposed. This court found that the district court could correct an original sentence which was invalid by imposing a sentence which could have validly been imposed in the first place.
Furthermore, the court in Blankenship cited State v. Shelby, 194 Neb. 445, 232 N.W.2d 23 (1975), in support of its holding. In Shelby, this court held that an erroneous or invalid sentence could be set aside and replaced by a valid one by the district court during the period of time that it retained jurisdiction over the defendant. Here, the district court no longer retained jurisdiction over the subject matter because Beverlin had already perfected the appeal of the first sentence. See, Sports Courts of Omaha v. Meginnis, supra; State v. Horr, supra; State v. Spotted Elk, supra.

CONCLUSION
The district court was divested of jurisdiction when Beverlin perfected his appeal of the first sentence. It had no jurisdiction to vacate the first sentence and resentence. The Court of Appeals did not have jurisdiction to consider an appeal of the second sentence. We therefore dismiss the appeal for lack of jurisdiction.
APPEAL DISMISSED.
WHITE, J., participating on briefs.
SHANAHAN, J., not participating.
