
441 P.2d 215 (1968)
79 N.M. 175
STATE of New Mexico, Plaintiff-Appellee,
v.
Ernest BALDONADO, Defendant-Appellant.
No. 110.
Court of Appeals of New Mexico.
May 3, 1968.
John H. Schuelke, Gallup, for appellant.
Boston E. Witt, Atty. Gen., Roy G. Hill, Asst. Atty. Gen., Santa Fe, for appellee.

OPINION
ARMIJO, Judge.
Appellant seeks post-conviction relief by his motion filed under § 21-1-1(93), N.M.S.A. 1953, which motion was ruled on without a hearing as being a second and successive motion for similar relief. This appeal follows from entry of order denying the motion.
The issue raised by this motion involves the alleged violation of appellant's constitutional rights as afforded under that portion *216 of the Fourteenth Amendment to the Constitution of the United States which states:
"* * * nor deny to any person within its jurisdiction the equal protection of the laws."
We do not discuss the issue concerning a second and successive motion and treat it as not being fatal on such grounds since disposition of the issue raised in the motion dispenses with consideration of question of a second or successive motion.
The grounds for relief alleged by appellant in his motion are as follows:
"A. On June 28, 1966, and for some period of time prior thereto, and at all times subsequent thereto, the Office of the District Attorney for the Eleventh Judicial District, Gallup, New Mexico, has followed a consistent and invariable administrative practice in declining to seek enhancement of punishment under the Habitual Criminal Act of New Mexico upon those persons having prior convictions occuring [sic] outside the State of New Mexico. The Office of the District Attorney has further acquiesced in the expunging from the record and the setting aside of sentences previously imposed [under] the Habitual Criminal Act in the class of cases described above. Vide: State v. Sandoval, McKinley County."
Appellant was tried and found guilty of possession of burglary tools. Following this conviction a criminal information was filed charging him as an habitual criminal based on earlier conviction of a felony in New Mexico to which he pleaded guilty; thereafter, he was sentenced to a term of years in the penitentiary as prescribed by statute for habitual offenders.
Appellant does not question the legality of his conviction nor does he challenge the authority to impose the sentence pronounced. His claim is directed to the unequal enforcement of the act with respect to habitual offenders.
For the reasons hereafter stated, we conclude the motion does not set forth grounds for relief. Nor do we think the fact the trial court denied the motion on grounds other than those applicable, constituted reversible error.
Appellant says the district attorney in the Eleventh Judicial District follows a consistent and invariable administrative practice of non-enforcement of the act dealing with habitual offenders in cases where the former conviction occurred outside of New Mexico. Since he was sentenced as an habitual offender based on prior felony committed in New Mexico, that the imposition of the enhanced penalty as applied to him denies him the equal protection of the law.
Section 40A-29-6, N.M.S.A. 1953, directs the district attorney, under specified conditions to file an information charging convicts as habitual offenders irrespective of whether the former conviction for felony was in state or out of state. The provisions of this act have been construed as mandatory. State v. McCraw, 59 N.M. 348, 284 P.2d 670 (1955).
The object of the act is for the purpose of inhibiting repetition of criminal acts by individuals against the peace and dignity of the state. It is designed to protect society against habitual offenders. Wesley v. Commonwealth, 190 Va. 268, 56 S.E.2d 362 (1949).
The motion presents an issue which courts with uniformity have held is not one which will be the basis for relief unless there is shown to be present in it an element of intentional or purposeful discrimination, Snowden v. Hughes, 321 U.S. 1, 64 S.Ct. 397, 88 L.Ed. 497 (1944), or intentional or arbitrary action amounting to an unjust and illegal discrimination between persons in similar circumstances. State v. Daley, 147 Conn. 506, 163 A.2d 112 (1960) and Oyler v. Boles, 368 U.S. 448, 82 S.Ct. 501, 7 L.Ed.2d 446 (1962).
The statute under which appellant was sentenced applies equally to members of a given class. The fact that the statute may not be enforced diligently, does not give rise to a right which would amount to denial of equal protection. As stated in Maloney *217 v. Maxwell, 174 Ohio St. 84, 186 N.E.2d 728 (1962):
"* * * In other words, equal protection does not entail uniform enforcement * * *
"To follow petitioner's contention would lead to an unconscionable result. It would relieve from liability the guilty on the basis that others equally guilty had not been prosecuted. Uniform operation of criminal justice does not require the release of the guilty for failure to prosecute others equally guilty."
Many reasons may exist for failure to prosecute persons subject to increased penalty as habitual offenders; for example, the prior conviction may not be susceptible of proof, or the procedures necessary to enforce attendance of witnesses from out of state may not be adequate.
The allegation of a "consistent and invariable administrative practice," in not enforcing the law with respect to habitual offenders uniformly, does not bring this case within the purview of the equal protection clause of the constitution.
Appellant relies on the doctrine laid down in Yick Wo v. Hopkins, 118 U.S. 356, 6 S.Ct. 1064, 30 L.Ed. 220 (1886). This case has no basis for application to a recidivist action. See People v. Montgomery, 47 Cal. App.2d 1, 117 P.2d 437 (1941); Sims v. Cunningham, 203 Va. 347, 124 S.E.2d 221 (1962); Evans v. Cunningham, 335 F.2d 491 (4th Cir.1964); State v. Hicks, 213 Or. 619, 325 P.2d 794 (1958), cert. denied, 359 U.S. 917, 79 S.Ct. 594, 3 L.Ed.2d 579 and Bailleaux v. Gladden, 230 Or. 606, 370 P.2d 722 (1962).
In People v. Montgomery, supra, in distinguishing the Yick Wo case from an habitual offender case, it was said:
"It should be borne in mind that in the Yick Wo case the equal protection of the law was extended to persons of a particular race to enable them to engage in a lawful business on a basis of equality with all other persons. Appellant now in effect argues from this that equal protection should also be extended to any person to enable him to commit a crime on a basis of equality with all other persons. While all persons accused of crime are to be treated on a basis of equality before the law, it does not follow that they are to be protected in the commission of crime. It would be unconscionable, for instance, to excuse a defendant guilty of murder because others have murdered with impunity. The remedy for unequal enforcement of the law in such instances does not lie in the exoneration of the guilty at the expense of society. * * * Protection of the law will be extended to all persons equally in the pursuit of their lawful occupations, but no person has the right to demand protection of the law in the commission of a crime. In civil matters the distinction is illustrated by the rule that the law will not enforce an illegal contract. If the law will not enforce an illegal contract, neither will it protect a criminal in the commission of his crime. * * *"
We conclude that in cases involving habitual offenders, non-uniform enforcement of the act is not grounds upon which to base an issue of unequal protection of the law.
In United States v. Manno, 118 F. Supp. 511 (N.D.Ill. 1954), involving alleged discrimination by IRS officials in law enforcement it was stated:
"* * * These decisions may be summed up by saying that citizens are entitled to equal protection of the law but these decisions do not hold that citizens are entitled to equal protection from the law. The fact that not all criminals are prosecuted is no valid defense to the one prosecuted. * * *"
Finding no error, the order denying appellant's motion is affirmed.
It is so ordered.
OMAN and WOOD, JJ., concur.
