#### STATE OF MONTANA, Relator, *v.*CHARLES RAY DOTY, Respondent.

No. 13689.

Submitted May 18, 1977.

Decided July 29, 1977.

566 P.2d 1388.

*234Douglas G. Harkin, argued, County Atty., Hamilton, for relator.

Garnaas, Hall, Riley & Pinsoneault, Missoula, J. Robert Riley, argued, Missoula, for respondent.

MR. JUSTICE HARRISON

delivered the opinion of the Court.

This is an original proceeding. Petitioner state of Montana seeks a writ of supervisory control or other appropriate relief directing the district court, Ravalli County, the Hon. Edward T. Dussault presiding, to vacate its order reversing the order of Justice of the Peace Ruth A. Daniels denying defendant’s motion to withdraw his plea of guilty, and to substitute therefor an order affirming the denial of defendant’s motion in the cause entitled State of Montana, *Plaintiff v. Charles Ray*Doty, Defendant, Criminal Cause No. C/1569, Ravalli County.

Oh April 15, 1976, defendant Charles Ray Doty was charged with the criminal offense of misdemeanor theft, pursuant to section 94-6-302, R.C.M.1947. The complaint was filed in the justice court, Ravalli County, before Justice of the Peace Ruth A. Daniels. Defendant Doty was found to be an officer of the Missoula City Police Department with approximately nineteen years of law enforcement experience.

On April 27, 1976, Doty appeared in Ravalli County justice court with his attorney, Harold Holt of Missoula, for arraignment. At that time, Doty entered a plea of not guilty. The court *235set June 16, 1976 as the date of trial. The trial date was subsequently continued to June 22, 1976. Doty conferred with his attorney on several occasions between the arraignment and the date of trial concerning his defense to the charge.

On June 17, 1976, following a telephone conversation with a friend, Doty telephoned Douglas Harkin, the Ravalli County attorney, and arranged for a meeting concerning the pending criminal action. Prior to the meeting, Doty attempted to contact his attorney of record for advice on the matter. Finding him unavailable, Doty consulted Missoula attorneys H. L. Garnaas and J. Robert Riley concerning the upcoming trial. He was advised the attorneys could not be prepared for trial upon such short notice. No further advice was given.

Doty proceeded to Hamilton to discuss the case with the county attorney, unaccompanied by counsel. The county attorney was apprised of the fact Doty was unable to reach his attorney prior to the meeting. During the discussion, the county attorney detailed the evidence he intended to use against Doty. The remainder of the conversation concerned the legal and nonlegal ramifications of a change of plea to guilty and failure to so change the plea, although the substance of this portion of the conversation is unclear. Doty returned to Missoula to again seek the advice of his attorney, who was still not available. Doty did speak briefly with his attorney’s partner, William Murray, who indicated he was insufficiently informed to be able to render advice. On that same afternoon, and without discussing the matter with his attorney of record, Doty returned to Hamilton. Approximately two hours after the meeting with the county attorney, he appeared in justice court unaccomanied by counsel, and withdrew his plea of not guilty, entering a plea of guilty in substitution. Doty was sentenced at that time.

On June 22, 1976, Doty filed a motion to withdraw his plea of guilty, together with an affidavit in support of his motion. In sum, Doty alleged in his affidavit the change of plea was improvidently made, in that it was made without the advice of counsel, and that at the time of the change of plea, he was “* * * dis*236traught, unable to think clearly or to fully appreciate the significance of his act * * *.” A hearing was held on the motion on June 25, 1976. The motion was subsequently denied. The decision was appealed to the district court, the case being submitted on the record, including the transcript of the hearing held on June 25, 1976, and the briefs of the respective parties.

The district court on December 6, 1976, entered an order reversing the decision of the justice court and remanding it for a trial on the merits. It is from this order the state brings its application for a writ of supervisory control or other appropriate writ.

This Court is asked to determine whether the district court erred or abused its discretion in reversing the order of the justice court; in allowing withdrawal of the guilty plea; and ordering that a trial be had on the merits. Whether defendant Doty should have been permitted to discuss his case directly with the county attorney and shortly thereafter change his plea from not guilty to guilty without the assistance of his counsel of record is the focus of determination here.

The state of Montana has but a limited right of appeal in criminal cases. Such right to appeal is statutory, and is confined to certain specific and narrowly defined instances, set forth in section 95-2403, R.C.M.1947. The state has no statutory right of appeal from a district court order which, as here, has the effect of granting a defendant’s motion to withdraw a plea of guilty. It is clear where a party has no plain, speedy or adequate remedy at law, and when there is no right of appeal from an order of a district court, a writ of supervisory control may issue to review the action of the district court. *State ex rel. Woodahl v. District Court,*166 Mont. 31, 530 P.2d 780; *State ex rel. Ryder v. District Court,*148 Mont. 56, 417 P.2d 89.

The vast weight of authority establishes the granting or refusal of permission to withdraw a plea of guilty and substitute therefor a plea of not guilty rests in the discretion of the trial court, and is subject to review only upon a showing of an abuse of discretion. *State v. Nance,*120 Mont. 152, 184 P.2d 554; *State v.*
      *237
      *McAllister,*96 Mont. 348, 30 P.2d 821; *State ex rel. Foot v. District*Court, 81 Mont. 495, 263 P. 979. Each case must necessarily be resolved upon its own set of facts and circumstances. There is no rule or standard which can be relied upon in any given case. *State v. Morgan,*131 Mont. 58, 307 P.2d 244; *State v. Nance,*supra. The Ravalli County justice court was, in this case, the trial court, being vested with original jurisdiction of the misdemeanor offense by virtue of section 95-302(a), R.C.M.1947. Therefore, it was the exercise of discretion by the justice court that was reviewed on appeal by the district court.

The trial court, in determining the validity of a plea of guilty, must determine that the plea is entirely voluntary, and made not inadvisedly, but rather with an understanding of the consequences. *State v. McBane,*128 Mont. 369, 275 P.2d 218; *State v. Casaras,*104 Mont. 404, 66 P.2d 774. It is not merely the province, but the duty of the court to make such a determination. The absence of counsel of record for the defendant at the time of the entry of the plea of guilty is a factor to be considered by the court in reaching its decision.

The transcript of the hearing held in justice court on the motion for a change of plea indicates defendant Doty steadfastly maintained his innocence of the charge until the moment he changed his plea to guilty. It further appears that prior to both the meeting with the county attorney and the subsequent change of plea, Doty had actively sought legal counsel from Harold Holt, his attorney of record, regarding the matter. The county attorney and the justice of the peace were aware at the time of the change of plea that Doty was still represented by Harold Holt. Yet, in determining that Doty’s change of plea was understandingly and advisedly made, the court failed to ascertain that Doty had in fact consulted with his attorney of record regarding his action, and the reason his attorney was not present for the proceedings. Failure to do so, despite Doty’s prior experience with courtroom procedures as a police officer, raises serious doubt as to the validity of the change of plea to guilty.

*238This Court has, on numerous occasions, enunciated the principle applicable in cases of doubt:

“* * * If there is any doubt that the plea is not voluntary, the doubt should be resolved in his [the defendant’s] favor. On application to change a plea, all doubts should be resolved in favor of a trial on the merits.” *State v. Casaras,*104 Mont. 404, 413, 66 P.2d 774, 778.

See also: *State v. McAllister,*96 Mont. 348, 30 P.2d 821.

Here, any irregularity and doubt should have been resolved by the trial court in favor of defendant, in his motion for a change of plea; then that doubt could properly be resolved by a jury. Only through trial on the merits following a change of plea would the ends of justice best be served in this case.

Therefore, it cannot be said the district court erred in finding an abuse of discretion on the part of the trial court. We find no impropriety in the action of the district court sufficient to invoke the supervisory control of this Court.

Relator’s petition is denied.

MR. CHIEF JUSTICE HATFIELD and JUSTICES DALY and SHEA concur.