
365 P.2d 822 (1961)
Jay John BUTLER, Petitioner,
v.
STATE of Montana, and Warden Floyd E. Powell, Respondents.
No. 10344.
Supreme Court of Montana.
Submitted September 21, 1961.
Decided October 25, 1961.
John F. Bayuk, (argued ex parte), Shelby, for petitioner.
JAMES T. HARRISON, Chief Justice.
Original Proceeding. Jay John Butler, an inmate of the Montana State Prison, has filed a petition for a writ of habeas corpus. He contends that he requested counsel be appointed to defend him upon a charge of burglary in the first degree, with a prior conviction; that the district court appointed an attorney for him on February 27, 1961, and petitioner thereafter entered a plea of guilty to the crime with which he was charged and was sentenced to a term of ten years in the State Prison.
Petitioner further alleges that the court-appointed attorney was the duly elected and qualified county attorney at the time of his prior conviction in 1950, being the prior conviction with which he was charged in 1961.
Petitioner argues that such appointment of counsel was contrary to the provisions of sections 93-2112 and 94-3509, R.C.M. 1947, which forbid prosecutors or attorneys to defend prosecutions carried on formerly by themselves, and that since his court-appointed attorney had formerly prosecuted him upon the prior conviction with which he was charged that such counsel was unable to effectively represent petitioner.
In what manner petitioner was not effectively represented does not appear in his application. It is however apparent that he received the minimum sentence that could be imposed by the court upon a plea of guilty with a prior conviction.
It should be stated here that petitioner filed a previous application for a writ of habeas corpus with this court, at that time being without the services of counsel, and ex parte a writ was issued, returnable before the district court of Powell County, Montana. Petitioner alleges that upon such hearing, at which he was represented by counsel, the district court denied the writ because no reasonable ground had been shown justifying its issuance. The district court, so we are advised by petitioner, *823 felt that while petitioner might have some rights they would not arise upon a habeas corpus proceeding.
Upon reflection and study of the problem here we are of the opinion that the ruling of the district court was correct. We recognize the writ of error coram nobis in this jurisdiction. See State v. Hales, 124 Mont. 614, 230 P.2d 960; State ex rel. Irvine v. District Court, 125 Mont. 247, 235 P.2d 662.
The jurisdiction of a writ of error coram nobis is in the court which rendered judgment, and in which the record is, and its purpose is to bring before that court for consideration some error of fact which might affect the validity and regularity of the proceeding and which was not brought in issue at the trial. Under such a procedure the court is given an opportunity to correct any error of fact, if any there be. See 24 C.J.S. Criminal Law § 1606.
From the application here if any error exists it would be one of fact and should properly be raised in the district court, where the judgments of conviction were entered.
For these reasons the writ is denied, without prejudice to the filing of an appropriate proceeding in the proper district court.
DOYLE, ADAIR, CASTLES and JOHN C. HARRISON, JJ., concur.
