This is an original proceeding in habeas corpus. Petitioner was convicted, in the justice’s court of Tonopah township of a misdemeanor, to wit, carrying a concealed weapon, committed on the 4th day of April, 1910. Upon appeal to the district court in and for Nye County, a trial was had de novo, and judgment of conviction again entered against him, and a fine imposed for such offense of $100, and that, in default of payment of said fine, he be imprisoned in the county jail of Nye County one day for each $2 of said fine. At the conclusion of the trial in the district court, the court sitting without a jury, a jury having been expressly waived, and the cause having been submitted for decision and judgment, the court filed an opinion in writing, including findings of fact in the nature of a special verdict. The facts so found by the court are as follows:
" (A) The Tonopah and Goldfield Railroad is a common carrier.
" (B) The defendants were employed as watchmen by the said railroad company.
" (C) The defendants were not employed in train service; that is, no one of them was employed on April 4, 1910, as a conductor, a brakeman, an engineer, or a fireman.
" (D) The defendants, on April 4,1910, in the town of Tonopah, Nye County, Nevada, were carrying concealed weapons.
" (E) The said concealed weapons were carried under *311instructions from the special agent of the said company, who in turn was acting under instructions from the superintendent.
" (F) The attorneys of the company had advised the superintendent that concealed weapons could be carried by all employees- of the railroad company; the language used being in part as follows: 'In our opinion, it permits all persons on our payroll to carry concealed weapons. ”
The statute (Stats. 1903, c. 114), for a violation of the provisions of which petitioner was convicted, is entitled "An act to prohibit the carrying of concealed weapons and to provide for the punishment thereof, ” and reads as follows:
"Section 1. It shall be unlawful for any person in this state to wear, carry or have concealed upon his person, in any town any dirk-knife, pistol, sword in case, slung-shot, or other dangerous weapon, without first obtaining permission from the board of county commissioners, attested by its clerk, of the county in which such concealed weapon shall be carried.
"Sec. 2. The board of county commissioners of any county in this state may, upon an application made in writing, showing the reason of the person, or the purpose for which any concealed weapon is to be carried, grant permission under its seal, and attested by its clerk, to the person making such application, authorizing such person to carry the concealed weapon described in such permission.
" Sec. 3. Any person who shall violate any of the provisions of this act shall be guilty of a misdemeanor and on conviction thereof shall be fined not less than twenty dollars, nor more than five hundred dollars, or by imprisonment in the county jail for not less than thirty days, nor more than six months.
"Sec. 4. This act shall not apply to peace officers in the discharge of their duties, nor to persons acting or engaged in the business of common carriers in this state, or to persons traveling through the state. ”
A number of contentions have been made by counsel *312for petitioner upon the hearing, only one of which will be necessary to consider. At the outset it is proper to note that the writ of habeas corpus cannot be used to perform the functions of an appeal or writ of error, that it can only go to a question of the jurisdiction of the court to enter the particular judgment, and not as to whether the court erred in the exercise of such jurisdiction.
It is, in effect, contended by counsel for the state that, conceding that the court found as a fact that the petitioner was in the class of persons exempted from the penal provisions of the-act, supra, nevertheless the court, had jurisdiction of the person of petitioner and the subject-matter embraced within the criminal complaint, and hence had jurisdiction to impose the particular judgment entered. If we concede this contention to be correct, it is the end of this proceeding. If this contention is the law, then upon a trial in the district court of a person charged with a violation of this act the court may, for example, find as a fact that he was the sheriff of the county, that he was carrying the concealed weapon in the discharge of his duty as such sheriff, and may, nevertheless, enter a judgment that he is guilty, and upon such judgment impose sentence of imprisonment; such judgment and sentence being only error of law, and not an excess of jurisdiction, which this court could redress.
Again, suppose that the case had been tried by jury and a verdict of not guilty returned, and the court, notwithstanding, imposed judgment and sentence of imprisonment; can it be said that this would be simple error within jurisdiction? These examples are extreme cases, and probably would not be found in the concrete; but they are examples wherein the court would have jurisdiction of both the subject-matter and the person, and, if the rule is as contended for by counsel for the state, they would not be examples of cases of excess of jurisdiction, and hence beyond relief by habeas corpus.
The modern doctrine of jurisdiction, the excess of which habeas corpus may relieve against, goes not only *313to jurisdiction over the person and the subject-matter, but to the power or jurisdiction to render the particular judgment. (21 Cyc. 296, and numerous cases cited in note 72, p. 297.) With this modern doctrine, which is more in accord with reason and justice, this court is already in accord. (Ex Parte Webb, 24 Nev. 238; Ex Parte Dela, 25 Nev. 346; Ex Parte Rickey, 31 Nev. 82; Ex Parte Roberts, 9 Nev. 44, 16 Am. Rep. 1.)
In Ex Parte Webb, supra, this court said: “There are three essential elements necessary to render convictions valid. These are that the court must have jurisdiction over the subject-matter, the person of the defendant, and authority to render the particular judgment. If either of these elements is lacking, the judgment is fatally defective, and the prisoner held under such judgment may be released on habeas eorpus. (Brown on Jurisdiction, 110, and cases cited; Courts on Jurisdiction, 641, and citations.)”
In Ex Parte Rickey, supra, we quoted with approval from Re Corryell, 22 Cal. 178, also quoted in Ex Parte Kearney, 55 Cal.229,the following: “ ‘The court derives its jurisdiction from the law, and its jurisdiction extends to such matters as the law declares criminal, and none other; and when it undertakes to imprison for an oifense to which no criminality is attached, it acts beyond its jurisdiction.’ ”
No better illustration of the wisdom and justice of this view of the law could be found than in cases like that under consideration, where a statute makes the doing of a certain act a penal offense, and then exempts a certain class of persons from its provisions. As against the exempted class the law has no force or effect, and the court is without power to impose punishment upon that exempted class for the doing of an act punishable as to others not within the exemption. In indictments or criminal complaints it is not necessary to allege that the defendant is not within an exemption specified in the statute; such exemption being regarded as a matter of *314defense. (State v. Robey, 8 Nev. 321; State v. Ah Chew, 16 Nev. 50, 40 Am. Rep. 488; State v. Buckaroo Jack, 30 Nev. 325.)
Where, however, upon the trial the evidence without conflict shows that the defendant is exempted from the penal provisions of the act, the court is without power to render a judgment of conviction. If there was a conflict in the evidence as to whether the defendant was or was not within the exempted class, unquestionably the trial court would have jurisdiction to determine the conflict, and if it determined that the defendant was not within the exemption upon such conflicting evidence its judgment on a case appealed from a justice’s court would be conclusive. But where the evidence, without conflict, establishes that the defendant belongs to a class not .within the purview of a penal statute, a court has no other alternative but to discharge him. A judgment of conviction in such a case would be in excess of the court’s power and void.
We therefore think it clear that this court on habeas corpus may go behind the judgment in cases of this character, and inquire whether it conclusively appears that the petitioner is within the exemption from the penal provisions of the statute for a violation of which he stands convicted. It becomes, then, a question within the legitimate province of this court upon a writ of habeas corpus to determine whether, under the facts found by the lower court, the petitioner was within the exemption of the statute.
The trial court for convenience of consideration, very properly divided the act in question into the following parts: “(1) Unlawful to carry concealed weapons. (2) In any town. (3) Without obtaining permission of the county commissioners. (4) Commissioners may grant permits. (5) Penalty for violation. (6) Exemption of peace officers. (7) Exemption of common carriers. (8) Exemption of travelers through the state.” Relative to the scope of the seventh subdivision made by the court, supra, the court said: “This court is now *315called upon for the second time to supplement the work of the legislature of 1903 as to the act under discussion. It has already stricken from the act all parts thereof not relating directly to ‘concealed’ weapons, because of the limitations of the title. It is now called upon to add enough words to part 7 to clear up its application, for without additional words it is almost devoid of meaning.” After a lengthy consideration of the purposes of the act and the rules of construction deemed controlling in its interpretation, the trial court reached the following conclusion : “Part 7 of this act is therefore interpreted to read as follows: ‘This act shall not apply to persons or corporations acting or engaged in the business of common carrier, or to such of their employees as are actually engaged as guards or messengers to protect property in transit, when on duty, or preparing for such duty, or returning from such duty.’ ”
There are rules governing the construction of penal statutes which do not apply to statutes generally, and which do not appear to have been taken into consideration by the trial court. The law is very jealous of the liberty of citizens, and this has led to the establishment cf stricter rules in the construction of penal statutes than apply to those of a different character.
In the case of State v. Wheeler, 23 Nev. 152, this court, construing a penal statute providing for certain exemptions, said: “But perhaps the strongest reason that can be given for the conclusion which we here announce is that this is a penal statute, and as such requires a strict construction when against a citizen, but a liberal one in his favor. ‘A penal statute is one which imposes a forfeiture or penalty for transgressing its provisions, or for doing a thing prohibited.’ * * * Being penal, the proviso exempting persons from the operation of the law should, on the other hand,. receive a liberal interpretation. Mr. Bishop states the rule thus: ‘While the parts of a penal statute which subject to punishment or a penalty are, from their odious nature, to be construed strictly, those which exempt from penal consequences *316will, because of their opposite character, receive a liberal interpretation.’ (Bishop, Writ. Laws, secs. 196, 226.) To the same effect are Sutherland, Stat. Const., sec. 227; Endlich, Stat. Int., sec. 332.”
In Ex Parte Deidesheimer, 14 Nev. 311, this court said: " Penal laws generally prescribe what shall or shall not be done, and then declare the consequences of a violation of either requirement. They should be plainly written, so that every person may know with certainty what acts or omissions constitute the crime. (Bish. on Stat. Crimes, 193; Beccariaon Crimes, 22, 45; The Schooner Enterprise, 1 Paine, 33 Fed. Cas. No. 4,499.) * * * And in United States v. Wiltberger, 5 Wheat. 76, 5 L. Ed. 37 (opinion by Chief Justice Marshall), the court says: 'It has been said that, although penal laws are to be construed strictly, the intention of the legislature must govern in their construction; that, if a case be within the intention, it must be considered within the letter of the statute'. The rule that penal laws are to be construed strictly is perhaps not much less old than construction itself. It is founded on the tenderness of the law for the rights of individuals, and on the plain principle that the power of punishment is vested in the legislative, not the judicial, department. It is the legislature, not the court, which is to define a crime and ordain its punishment. * * * The intention of the legislature is to be collected from the words they employ. Where there is no ambiguity in the words, there is no room for construction. The case must be a strong one, indeed, which would justify a court in departing from the plain meaning of the words, especially in a penal act, in search of an intention which the words themselves do not suggest. To determine that a case is within the intention of a statute, its language must authorize us to say so.’. See, also, Sedgwick on the Construction of Stat. and Const. Law, 279, et seq.; Smith’s Commentaries, 746; Bish. on Stat. Crimes, 193, et seq.” (Ex Parte Rickey, 31 Nev. 102.)
"It is, however, the object of the construction of penal as of all other statutes to ascertain the true legislative *317intent; and while the courts will not, on the one hand, apply such statutes to cases which are not within the obvious meaning of the language employed by the legislature, even though they be within the mischief intended to be remedied, they will not, on the other hand, apply the rule of strict construction with such technicality as to defeat the purpose of ascertaining the true meaning and intent of the statute.” (26 Am. & Eng. Ency. Law, p. 659.)
The legislature has enacted that "this act shall not apply * * * to persons acting or engaged in the business of common carriers in this state.” The trial court has construed this language to mean: "This act shall not apply to persons or corporations acting or engaged in the business of common carrier, or to such of their employees as are actually engaged as guards or messengers to protect property in transit, when on duty, or preparing for such duty, or returning from such duty.” The legislature made no restriction to the exemptions specified in section 4 of this act, save as to peace officers.when."in the discharge of their duties.” Under what theory of construction courts can place limitations on the language used by the legislature, so as to bring within such restricted construction persons liable to its penal provisions who are not manifestly included under the general provisions, is not clearly apparent.
Under the rules governing the construction of' penal statutes, provisions creating an exception are to be liberally construed. (State v. Wheeler, supra.) Courts have nothing to do with the wisdom and policy of the- legislature as set forth in its enactments. It may have been unwise, from the viewpoint of the courts, to have created all the exceptions which it did in this particular statute, but the courts cannot presume to supplement their action by a virtual amendment of its provisions that is not in accordance with the manifest intent deducible from the language of the act itself.
■■ 'Under the provisions of this act it is not a misdemeanor for any one to carry a concealed weapon outside the *318limits of a town. Equally cogent reasons might be advanced why employees of a common carrier who are engaged as watchmen of the property of the carrier, or the property of its patrons in its depots, warehouses or other buildings, should be permitted to carry concealed weapons as those who are engaged as guards or messengers to protect property in transit. If we are to construe this law so as to limit it to guards and messengers having charge of property in transit, why exclude stage drivers, or engineers, firemen, conductors, or brakemen who have a part in the transportation of persons and property by the carrier? When an attempt is made to place limitations on the language of the legislature, and say that the exemption applies to this class of persons or employees, but does not apply to those in another class of the same general employment, we at once are lost in a maze of diversified reasoning relative to wisdom and policy, which naturally appeals with different degrees of force to different minds.
It may have been unwise for the legislature not to have placed specific limitations upon all the exemption provisions of the statute, but the fact remains that it did not. For the courts to place limitations upon general exemption provisions in the case of a penal statute like this is something more than construction, and is violative of the rule that such provisions shall be liberally construed in favor of the individual. Penal statutes should be so clear as to leave no room for doubt as to the intention of the legislature, and where a reasonable doubt does exist as to whether the person charged with a violation of its provisions is within the statute, that doubt must be resolved in favor of the individual.
If the legislature did not in fact intend tháít the required liberal construction be placed upon the exemption features of this statute, then certainly they failed to make such intent clear. In view of the language of the statute, we' cannot say that the legislature did not intend that a broad construction be placed on the exemption relative to common carriers when it used *319the different words of a general character, "acting or engaged in the business of common carriers." Evidently this language, under the rule that we are bound to give a liberal construction to penal statutes, means something more than persons engaged "in common carrying,” and may include persons acting or engaged in other business of common carriers than actual transportation of freight or passengers, such, for instance, as the guarding of the trains, depots, or property of common carriers. Under such construction, we cannot see that persons who are employed as watchmen of the property of common carriers are clearly within the provisions of the statute. Not being clearly within its provisions, we are bound to hold that they are without its provisions. If the exemption be considered too broad, it is better that it be left to the lawmaking body to amend than for the courts to attempt to construe into the act a legislative intent that is not clearly manifest.
The petitioner is discharged.