
284 P.2d 670 (1955)
59 N.M. 348
STATE of New Mexico, Plaintiff-Appellee,
v.
Jack P. McCRAW, Defendant-Appellant.
No. 5891.
Supreme Court of New Mexico.
May 31, 1955.
W.S. Martin, Jr., Lovington, for appellant.
Richard H. Robinson, Atty. Gen., Fred M. Standley, Asst. Atty. Gen., J.H. Burttram, Sp. Asst. Atty. Gen., for appellee.
McGHEE, Justice.
On June 11, 1953, the appellant was convicted of the crime of breaking and entering with intent to commit a felony and was sentenced to serve not less than two and one-half years, nor more than three years in the penitentiary. On July 22, 1953, an information charging him with having been convicted of four felonies in other states previous to his conviction in Lea county was filed. Thereafter, on June 17, 1954, an amended information was filed charging the conviction of appellant on four felony charges in other states, which, had they been committed in New Mexico, would have been felonies here.
Following the filing of the amended information the appellant filed his motion to quash it on various grounds. The motion was denied and after a verdict of guilty on all counts was found, the original sentence was vacated and the appellant was sentenced to imprisonment in the penitentiary for life, in accordance with the provisions of § 41-16-3, 1953 Compilation; this appeal followed.
Only two points are relied upon for reversal here: First, that the provisions of our Habitual Criminal Act, §§ 41-16-1 through 41-16-4, 1953 Compilation, do not apply to this appellant because of his claim the District Judge and District Attorney knew of his prior convictions at the time he was first sentenced; and, second, the failure to charge him as an habitual criminal when the prior convictions were known to the court and district attorney constituted a waiver of the right of the state to so charge him.
It is stipulated the District Attorney knew of the former convictions at the time *671 of the original trial, but there is nothing in the record to indicate the trial judge knew of them and the state challenges the statement as to the latter.
The applicable sections of our statutes read:
"A person who, after having been three (3) times convicted within this state of felonies, or under the law of any other state, government or country, of crimes which if committed within this state would be felonious, commits a felony within this state, shall be sentenced upon conviction of such fourth, or subsequent offense to imprisonment in the state penitentiary for the term of his natural life. A person to be punishable under this and the preceding sections need not have been indicted and convicted as a previous offender in order to receive the increased punishment therein provided, but may be proceeded against as provided in the following section." § 41-16-3, 1953 Compilation.
"If at any time, either after sentence or conviction, it shall appear that a person convicted of a felony has previously been convicted of crimes as hereinbefore set forth, it shall be the duty of the district attorney of the district in which such conviction was had, to file an information accusing the said person of such previous convictions. Whereupon the court, in which such conviction was had, shall cause the said person, whether confined in prison or otherwise, to be brought before it and shall inform him of the allegations contained in such information and of his right to be tried as to the truth thereof according to law, and shall require such offender to say whether he is the same person as charged in such information or not. If he says he is not the same person or refuses to answer, or remain silent, his plea, or the fact of his silence, shall be entered of record and a jury shall be empaneled to inquire whether the offender is the same person mentioned in the several records as set forth in such information. If the jury finds that he is the same person or if he acknowledges or confesses in open court, after being duly cautioned as to his rights, that he is the same person, the court shall sentence him to the punishment above precribed, as the case may be, and shall vacate the previous sentence, deducting from the new sentence all time actually served on the sentence so vacated. Whenever it shall become known to any warden or prison, probation, parole or police officer or other peace officer that any person charged with or convicted of a felony has been previously convicted within the meaning of said sections one (41-16-1), two (41-16-2) or three (41-16-3), it shall become his duty forthwith, to report the facts to the district attorney of the county." § 41-16-4, 1953 Compilation.
"No indictment or information shall contain an allegation of a prior conviction of the defendant unless such allegation is necessary to charge the offense under section 42-607 (41-6-7)." § 41-6-25, 1953 Compilation.
The case of Smalley v. People, 1935, 96 Colo. 361, 43 P.2d 385, supports the contention of appellant, but the state which originally enacted the habitual act in the United States, New York, holds squarely to the contrary. It was held in Dodd v. Martin, 1928, 248 N.Y. 394, 162 N.E. 293, the provisions of the act were mandatory, even though the sentencing judge and the district attorney knew of the previous convictions at the time of the original sentence, and that mandamus was proper to compel an unwilling judge to sentence the defendant under the provisions of the act.
Although mandamus was not involved, it has been held in other states having the habitual criminal act that knowledge of the district attorney, and even of the judge, does not bar a prosecution under the act, the setting aside of a former sentence and the imposition of a new one, in the following cases: Graham v. West Virginia, 1912, 224 U.S. 616, 32 S.Ct. 583, 56 L.Ed. 917; affirming State v. Graham, 1911, 68 W. Va. 248, 69 S.E. 1010, 40 L.R.A.,N.S., 924; Cross v. State, 1928, 96 Fla. 768, 119 So. 380; Macomber v. State, 1947, 181 Or. 208, *672 180 P.2d 793; Commonwealth ex rel. Foster v. Ashe, 1941, 146 Pa.Super. 482, 23 A.2d 245.
The Macomber opinion contains a masterful analysis of all the cases on the point here involved and one interested will there find the answers given by the courts, except in Colorado, to the contention here made.
We agree with the holdings of the majority of the courts passing upon these statutes that their terms are mandatory and that a district attorney or judge, or both, may not nullify the statutes by ignoring them.
In order to secure a conviction before a jury it was necessary to prove previous felony convictions in Alabama and North Carolina, and, in addition, the fact that the appellant was the person so convicted. The securing of such proof and arranging for it to be presented in New Mexico at one time likely required considerable time and, no doubt, was the reason for the delay.
The sentence imposed on the habitual criminal information will be affirmed, and it is so ordered.
COMPTON, C.J., and LUJAN, SADLER and KIKER, JJ., concur.
