
449 P.2d 89 (1968)
79 N.M. 719
STATE of New Mexico, Plaintiff-Appellee,
v.
Edison W. CLIETT, Defendant-Appellant.
No. 223.
Court of Appeals of New Mexico.
December 27, 1968.
William H. Carpenter, Albuquerque, for appellant.
Boston E. Witt, Atty. Gen., Spencer T. King, Asst. Atty. Gen., Santa Fe, for appellee.

OPINION
WOOD, Judge.
The dispositive issue is whether defendant was entitled to a hearing on the question of his competency to plead guilty. In August 1962, defendant pleaded guilty to armed robbery committed in December 1960. In November 1967, defendant moved for post-conviction relief under § 21-1-1 (93), N.M.S.A. 1953 (Supp. 1967). The trial court determined that the motion, files and records conclusively showed that defendant was not entitled to relief and denied the motion without a hearing.
Defendant appeals, urging that the issue of his competency could not be conclusively determined from the files and records and that he was entitled to a hearing on this issue. We agree. In addition, defendant asserts that promises and threats on the part of the Assistant District Attorney induced his plea of guilty. We do not think the trial court erred in denying this point *90 without a hearing since its basis is very similar to that considered, and determined adverse to defendant, in State v. Robbins, 77 N.M. 644, 427 P.2d 10 (1967). Defendant also raises issues that are waived by a valid plea. We do not consider them since there must be a factual determination of whether defendant was competent to plead guilty.
State v. Roybal, 76 N.M. 337, 414 P.2d 850 (1966) states:
"* * * It is a generally accepted rule that no person shall be called upon to stand trial or be sentenced who because of mental illness is incapable of understanding the nature and object of the proceedings, or of comprehending his own condition in reference thereto, or of making a rational defense. * * *"
On December 23, 1960, counsel moved for a psychiatric examination of defendant at the expense of the state on the ground that defendant "* * * is mentally incapable of rationally cooperating in his defense. * * *"
The record is incomplete at this point. We assume, however, that the motion of December 23, 1960 was granted; that there was a psychiatric examination; that the report of the examination did not indicate that defendant was incapable of cooperating in his own defense. These assumptions are made because on February 3, 1961 a hearing was held and an order entered. The order denied a motion to "* * * grant the defendant further psychiatric examinations. * * *" At the conclusion of the hearing the trial court referred to Dr. Evilsizer's report to the effect that defendant "* * * is presently so far free from mental disease, defect, or derangement so as to be able to conduct and cooperate in his own defense. * * *"
Thus, at this point the trial court had inquired into the matter and by denying the motion for "further" examination in effect ruled that there was no reasonable doubt as to defendant's capacity to make a rational defense. State v. Roybal, supra; State v. Upton, 60 N.M. 205, 290 P.2d 440 (1955).
However, the order of February 1961 did not end the matter. In June 1961, defendant moved for "* * * further medical examinations as recommended by Dr. Thomas S. Evilsizer, Jr. in his report of January 16, 1961. * * *" In support of the motion, counsel referred to medical records that "* * * have now been made available. * * *" According to counsel, the records indicate that defendant suffered a head injury in March 1957 and that three surgical procedures were performed in March 1957: arteriography twice and a craniectomy once. The record does not show the disposition of the motion. Nor does the record include Dr. Evilsizer's report of January 1961; we do not know what further examinations were allegedly recommended.
Apparently, however, defense counsel made his own arrangements for examinations and tests. Orders were entered in November and December 1961 authorizing the Sheriff to have defendant present for an "* * * electro encephalograph * * *", neurological examination by Dr. J.M. Mosier, and a psychological examination by Dr. John Salazar. In February 1962, an order was entered authorizing the Sheriff to have defendant present for a medical examination at the Veterans Hospital in Albuquerque. We do not know whether these examinations were performed or if performed, the results.
In April 1962, counsel moved for an additional examination by Dr. Evilsizer at the cost of Bernalillo County. This motion was granted. However, the record does not show the results of this examination.
The record includes a certificate of discharge from the New Mexico State Hospital indicating that the District Court committed defendant to that institution on May 16, 1962; that the institution discharged him June 21, 1962 as "* * *  without psychosis  returned to the jurisdiction of the District Court."
*91 On August 17, 1962 defendant withdrew his plea of not guilty and entered a plea of guilty. At the time of this plea, defense counsel stated:
"* * * We have had him examined by two or three psychiatrists and there seems to be an apparent conflict between them. We have agreed that the conflict should be resolved in favor of a plea at this time. * * *"
In consequence of the plea, defendant was committed to the penitentiary. He was transferred from the penitentiary to the State Hospital on September 21, 1962 "* * on an emergency hospitalization status. * * *" The re-admission note states: "* * * According to Dr. Elsa Brumlop, the patient is psychotic. * * *" However, on November 29, 1962 the note indicates that defendant did not manifest "* * * overt abnormal behavior." and "* * * should be returned to the penitentiary on convalescent leave."
State v. Upton, supra, states that once the issue of "present sanity" is raised, the trial court has a duty to inquire into the matter. As a result of the inquiry, the trial court "* * * must rule as to whether a reasonable doubt exists as to the sanity of the accused. * * *" Compare State v. Roybal, supra.
The record shows that between the ruling of February 1961, and the guilty plea of August 1962, various motions for examination had been filed, and that the trial court had committed defendant to the State Hospital. At the time of the guilty plea, counsel indicated a conflict of opinion as to defendant's mental condition. Under this record, the question of defendant's condition was before the trial court and that court had a duty to rule on the question. State v. Upton, supra. The trial court did not do so, apparently accepting counsel's statement "* * * that the conflict should be resolved in favor of a plea. * * *"
The issue not having been previously determined by the trial court, the question of defendant's competency to plead could be raised in the post-conviction proceeding. State v. Guy, 79 N.M. 128, 440 P.2d 803 (Ct.App. 1968); compare Hoffman v. State, 79 N.M. 186, 441 P.2d 226 (Ct. App. 1968).
In denying the motion for post-conviction relief, the trial court found that defendant was discharged from the State Hospital in June 1962 as being sane and without psychosis. The trial court also found that defendant was not suffering from any mental illness at the time he pleaded guilty. We assume that the finding as to absence of "mental illness" is a finding that defendant was legally sane at the time of the plea. We fail to see how either the record or the trial court's findings conclusively establish "no reasonable doubt" as to defendant's competency since the record indicates that defense counsel called the court's attention to the conflicting opinion of the psychiatrists. But, we do not base our opinion on this point.
Defendant must allege a specific factual basis for the relief sought. State v. Guy, supra. Defendant did so; he alleged the transfer to the State Hospital shortly after his commitment to the penitentiary and the "psychotic" diagnosis, at that time, of Dr. Brumlop. These allegations of post-conviction confinement in a mental institution and diagnosis as a psychotic are sufficiently close to the date of his plea to raise a factual issue concerning his competency to plead. State v. Guy, supra.
Defendant was entitled to a hearing on the issue of his competency to enter a guilty plea. The order denying relief is reversed. The cause is remanded to the trial court with instructions to grant defendant an evidentiary hearing on the issue of his competency to enter a plea on August 17, 1962.
It is so ordered.
OMAN and ARMIJO, JJ., concur.
