
2 Ariz. App. 593 (1966)
411 P.2d 31
Richard A. PETERSON, Appellant,
v.
Joe JACOBSON, Justice of the Peace of Precinct No. 4 of Pima County, Arizona, Appellee.
No. 2 CA-CIV 125.
Court of Appeals of Arizona.
February 17, 1966.
*594 Lesher, Scruggs, Rucker, Kimble & Lindamood, by D. Thompson Slutes, Tucson, for appellant.
Norman E. Green, Pima County Atty., Carl Waag, Deputy Pima County Atty., Tucson, for appellee.
HATHAWAY, Judge.
On July 2, 1964, appellant Richard A. Peterson was cited for (1) speeding and (2) driving while under the influence of intoxicating liquor. A criminal complaint was filed against him in Justice Court, Precinct No. 4, charging him with both crimes. He pleaded guilty to the charge of speeding and not guilty to the charge of driving while intoxicated, and on August 20, 1964, was tried before appellee on the latter charge. At the conclusion of the trial the court ordered the complaint amended to charge "Reckless Driving," found the appellant guilty of same and set August 27, 1964 as the date for sentencing on the conviction of reckless driving.
On August 24, 1964 appellant filed a notice of appeal to the superior court[1] and a trial de novo was set for November 13, 1964. On the latter date and prior to commencement of the proceedings, appellant moved the court to dismiss the reckless driving conviction on the ground that it was a void judgment. The motion was granted whereupon the State requested leave of court to try appellant on the charge of driving while intoxicated since this was a trial de novo. The trial court subsequently ruled that the State could try the appellant in superior court on the driving while intoxicated charge. Appellant moved to dismiss the appeal, the motion was granted and appellant's bond was refunded.
Shortly thereafter appellee notified appellant of the date for sentencing on the reckless driving conviction. Appellant then petitioned the superior court for a writ of prohibition against appellee on the ground that appellee lacked jurisdiction to sentence appellant. An alternative writ of prohibition issued which was subsequently quashed, the court finding that notwithstanding the amendment of the complaint by appellee was error, the error did not deprive the justice court of jurisdiction and such error was waived when the appellant dismissed his appeal. This appeal is from the denial of the writ of prohibition, posing for our determination whether the writ should have issued.
The function of a writ of prohibition is to prevent an inferior tribunal from acting without or in excess of its jurisdiction. In re West's Adoption, 87 Ariz. 234, 237, 350 P.2d 125 (1960); Martin v. Superior Court, 96 Ariz. 282, 394 P.2d 211 (1964). If the justice court's action in amending the complaint was mere error in a matter within its jurisdiction, rather than an assumption of nonexistent jurisdiction, prohibition was not the proper remedy to correct the error. Loftus v. Russell, 69 Ariz. 245, 253, 212 P.2d 91 (1949).
*595 Commencement of criminal actions in this state is governed by A.R.S. § 22-311 and Rule 1, Rules of Criminal Procedure, 17 A.R.S.
A.R.S. § 22-311 provides:
"A. All proceedings and actions before justice of the peace courts for public offenses of which such courts have jurisdiction shall be commenced by complaint, under oath, setting forth the offense charged, with such particulars of time, place, person and property as to enable defendant to understand distinctly the character of the offense complained of and to answer the complaint." (Emphasis supplied)
Rule 1, Rules of Criminal Procedure, provides:
"A. All criminal actions and proceedings brought before any magistrate for a public offense, triable within the county, shall be commenced by complaint, in writing, under oath, setting forth the offense charged, with such particulars of time, place, person and property as to enable the defendant to understand distinctly the character of the offense complained of." (Emphasis supplied)
We note that the language of the statutes is mandatory  an action "shall be commenced by complaint." The jurisdiction of the justice court is invoked by the filing of a complaint which conforms to the statutory requirements. In order to render a valid judgment and sentence in a criminal prosecution, the court must have jurisdiction both of the offense and of the defendant's person. 21 Am.Jur.2d, Criminal Law § 376. Jurisdiction of a court to try and punish an individual accused of crime cannot be acquired by the court's mere assertion of jurisdiction, but must be invoked or acquired in the mode prescribed by law. If not so invoked, any judgment is a nullity. 22 C.J.S. Criminal Law § 143.
An accused may be convicted of an offense different from that with which he was charged only if it is included in the offense charged. State v. Parsons, 70 Ariz. 399, 406, 222 P.2d 637 (1950). The crime of reckless driving, however, and that of driving while intoxicated are separate and distinct offenses and are established by different evidence. State v. Sisneros, 42 N.M. 500, 82 P.2d 274, 278 (1938); People v. Clenney, 165 Cal. App.2d 241, 331 P.2d 696, 701 (1958).
Concededly the evidence at appellant's trial may have shown he was guilty of reckless driving. Nonetheless, since he was not charged with this offense and since it was not an offense included within the crime with which he was charged, he could not be convicted of reckless driving. Application of Hess, 45 Cal.2d 171, 288 P.2d 5, 7 (1955); Gross v. Commonwealth, Ky., 288 S.W.2d 353, 355 (1956). The court did not acquire jurisdiction of this subject matter since a complaint setting forth the charge of reckless driving was not filed. See State ex rel. Clark v. Allaman, 87 Ohio App. 101, 90 N.E.2d 394, 397 (1950).
An amendment is not permissible if it changes the nature of the offense. State v. Rickenberg, 58 Utah 270, 198 P. 767, 769 (1921). To permit otherwise would deprive one accused of crime of his constitutional right to know the nature and cause of the accusation against him. Arizona Constitution, Article 2, Section 24, A.R.S. We hold, therefore, that appellee was without jurisdiction to try the appellant on the charge of reckless driving and the judgment of conviction was a nullity.[2] Prohibition should therefore issue before appellant is aggrieved by further proceedings *596 coram non judice. Westerlund v. Croaff, 68 Ariz. 36, 198 P.2d 842 (1948). The order quashing the alternative writ of prohibition should be vacated and a peremptory writ of prohibition should issue prohibiting the Justice of the Peace of Precinct No. 4 of Pima County, Arizona, from sentencing the appellant for reckless driving in case No. 4572 and it is so ordered.
KRUCKER, C.J., and MOLLOY, J., concurring.
NOTES
[1]  A.R.S. § 22-371, as amended, provides:

"A. The defendant in a criminal action may appeal to the superior court from the final judgment of a justice or police court.
"B. The appeal shall be taken within ten days after imposition of sentence * * *."
The appeal to superior court was prematurely taken as appellant had not as yet been sentenced. The right of appeal afforded by statute is from a final judgment. In a criminal case, imposition of sentence is required for finality and concomitantly for appealability of a judgment of conviction. 4 Am.Jur.2d, Appeal and Error § 161. The sentence is the judgment. Parr v. United States, 351 U.S. 513, 76 S.Ct. 912, 916, 100 L.Ed. 1377 (1956); Whitney v. Commonwealth, 337 Mass. 722, 151 N.E.2d 272, 273 (1958); Birnbaum v. United States, 107 F.2d 885, 887, 126 A.L.R. 1207 (4th Cir.1939).
[2]  See State v. Rogers, 2 Ariz. App. ___, 407 P.2d 773 (1965), wherein Division One of this Court held that the lower court was without jurisdiction to pass sentence based upon an amended information. Rogers had entered a plea of guilty to a defective information and subsequently an amended information was filed. He was not rearraigned on the amended information.

The trial court's ruling that the plea of guilty to the original information applied to the amended information was held to be erroneous.
