
691 So.2d 587 (1997)
Aundra AKINS, Appellant,
v.
STATE of Florida, Appellee.
No. 96-300.
District Court of Appeal of Florida, First District.
April 16, 1997.
*588 Steven L. Seliger, of Garcia and Seliger, Quincy, for Appellant.
Robert A. Butterworth, Attorney General; Trisha E. Meggs, Assistant Attorney General, Tallahassee, for Appellee.
PER CURIAM.
Appellant raises two issues in this appeal following his guilty plea. We affirm in regard to the second issue without discussion. As explained below, we reverse on the first issue.
Appellant was charged by superseding indictment with first degree murder, attempted first degree felony murder, two counts of attempted robbery with a firearm, and one count of shooting into an occupied vehicle. On January 23, 1995, appellant entered a negotiated plea of guilty to the lesser included offense of second-degree murder on Count I and guilty as charged on Count II, and the State agreed to nol pros Counts III, IV, and V and recommend that appellant's sentence not exceed 40 years on each count with 3-year minimum mandatories on each count concurrent. After the guilty plea was taken but before the sentencing hearing was held on November 14, 1995, the Florida Supreme Court decided State v. Gray, 654 So.2d 552 (Fla.1995), which invalidated the crime of attempted felony murder. At the sentencing hearing, appellant and the state specifically addressed the fact that appellant had pled guilty to first-degree attempted felony murder by jointly stipulating to a substitution of attempted first-degree premeditated murder on Count II for purposes of sentencing. In the instant case, appellant argues that this stipulation was ineffectual to amend the indictment and that appellant thus was convicted of the non-existent crime of attempted felony murder. We agree.
In State v. Gray, 435 So.2d 816 (Fla.1983), the court ruled that an indictment or information failing to allege an essential element of a crime did not charge a crime and that this constitutes both denial of due process and fundamental error.
The state is correct in arguing that ordinarily the test for granting relief based on a defect in the charging document is actual prejudice to the fairness of the trial. However, a conviction on a charge not made by the indictment or information is a denial of due process of law. If the charging instrument completely fails to charge a crime, therefore, a conviction thereon violates due process. Where an indictment or information wholly omits to allege one or more of the essential elements of the crime, it fails to charge a crime under the laws of the state.
Id. at 818 (citations omitted). Accord Jozens v. State, 649 So.2d 322 (Fla. 1st DCA 1995)(reversing conviction and sentence for lewd and lascivious act because information failed to charge a crime and conviction for nonexistent offense is reversible fundamental error). See Smith v. State, 324 So.2d 699, 700 (Fla. 1st DCA 1976).
In the instant case appellant was charged by indictment, and Florida cases have long held that an indictment, unlike an information, cannot be amended, not even by a grand jury, to charge a different, similar, or new offense. Smith v. State, 424 So.2d 726, 729 (Fla.1983)("[A] grand jury has no authority to amend an indictment to charge an additional or different offense," but "may file a completely new indictment regarding the same alleged criminal actions, even though a prior indictment is pending."), cert. denied, 462 U.S. 1145, 103 S.Ct. 3129, 77 L.Ed.2d 1379 (1983). Amending an indict ment by stipulation to charge attempted premeditated murder as was done in the instant case, therefore, is not permissible. See Huene v. State, 570 So.2d 1031, 1032 (Fla. 1st DCA 1990)("An indictment is amended when it is so altered as to charge an additional or different offense from that found by the grand jury."), review denied, 581 So.2d 1308 (Fla.1991). The trial court thus lacked jurisdiction to sentence appellant for attempted first-degree felony murder because this offense was no longer a crime at the time he was sentenced, and the court lacked jurisdiction to sentence appellant for attempted premeditated *589 murder because an indictment cannot be amended by stipulation of the parties. An "invited error" analysis is inapplicable in the instant case because jurisdiction cannot be conferred on the court by agreement of the parties. Evans v. State, 647 So.2d 180 (Fla. 1st DCA 1994)("The parties cannot, even by stipulation, confer jurisdiction upon a court where no jurisdiction exists.")
We vacate appellant's conviction and sentence for first degree attempted felony murder only. Upshaw v. State, 665 So.2d 303, 304 (Fla. 2d DCA 1995)(vacating convictions for nonexistent crime of attempted first degree felony murder and invalidating defendant's nolo plea because entered "on a material mistake of law"). On remand the state may file an information or indictment that charges a valid offense. See Upshaw, supra; Zanger v. State, 548 So.2d 746, 748 (Fla. 4th DCA 1989). In addition, the state has the option of withdrawing from the entire plea agreement. Williams v. State, 650 So.2d 1054, 1055 (Fla. 1st DCA 1995); Forshee v. State, 579 So.2d 388, 389 (Fla. 2d DCA 1991).
Accordingly, the case is affirmed in part, reversed in part, and remanded for further proceedings in accordance with this opinion.
MINER, ALLEN and MICKLE, JJ., concur.
