delivered the opinion of the Court.
*505Petitioner Larry Lawrence Gonzales, Jr., has filed a pro se petition for a writ of habeas corpus alleging (1) that the District Court was without jurisdiction to revoke his deferred sentence after it had expired or was completed and (2) that he was denied effective assistance of counsel by reason of the failure of his court-appointed counsel to raise this as a defense.
On October 24, 1977, the District Court of Yellowstone County deferred imposition of sentence and placed petitioner on probation for a period of one year following his plea of guilty to the crime of aggravated assault. On August 14, 1978, the District Court extended the deferred imposition of sentence an additional two years to October 24, 1980, following a revocation hearing wherein petitioner admitted a parole violation. On April 4, 1979, the District Court again extended the deferred imposition of sentence until October 24, 1982, following a second revocation hearing wherein the District Court found that petitioner had again violated his parole.
On February 2, 1981, petitioner was found guilty of the crime of criminal mischief, a misdemeanor, in the Justice Court of Yellowstone County. Two days later the county attorney filed a third petition for revocation of petitioner’s deferred imposition of sentence based on this misdemeanor conviction which constituted a parole violation as well. Following a hearing, the District Court revoked its order staying deferment of sentence and sentenced petitioner to a term of five years in the State Prison for the original crime of aggravated assault.
Petitioner contends in this habeas corpus proceeding that:
(1) the District Court lacked jurisdiction to revoke the deferment of sentence and to sentence him for the original crime because petitioner had completed the period of deferment and probation; and
(2) petitioner was denied effective assistance of counsel by failure of his court-appointed counsel to raise this defense in the revocation proceeding.
*506The State raises four additional issues that it considers necessary to the resolution of this proceeding:
(1) Is a deferred imposition of sentence a valid sentence that can only be vacated or modified pursuant to statutory authority?
(2) Is section 46-18-203, MCA, a limitation upon the District Court’s sentencing authority?
(3) What is meant by the statutory language of section 46-18-203, MCA, wherein the district judge is granted optional and discretionary authority to “retain such jurisdiction with his court”?
(4) Were the orders extending the period of deferment of imposition of sentence in excess of the District Court’s jurisdiction?
We find that only the first issue raised by the petitioner need be addressed by the Court in reaching a decision in this matter.
The District Court is granted broad and flexible sentencing authority by statute, sections 46-18-201 et seq., MCA. Specifically, the district judge is granted authority to defer imposition of sentence following conviction of a felony for a period not exceeding three years. Section 46-18-201(1 )(a), MCA. In this action the petitioner’s sentence was deferred on three separate occasions by the District Court for a total deferral period of five years. The District Court’s order of October 24, 1977, deferred imposition of sentence and placed petitioner on probation for a period of one year. Following an admitted violation of probationary rules, the period of deferment was extended an additional two years. Following a second violation of probationary rules, the period of deferment was extended another two years. During that period of deferment, petitioner was found guilty of a misdemeanor, his deferment was revoked and he was sentenced to five years imprisonment. Petitioner contends that the District Court exceeded its jurisdiction in extending the total time of deferment beyond the three-year limitation provided by statute, and we agree.
Section 46-18-201(1 )(a), MCA, gives the district judge authority to defer imposition of sentence following conviction of a felony for a period not exceeding three years. The language of the statute is *507clear and unambiguous and it is the function of this Court, as set forth in section 1-2-101, MCA, to simply ascertain and declare what is in terms or in substance contained in the statute. “When the language of the statute is plain, unambiguous, direct and certain, the statute speaks for itself and there is nothing for the Court to construe.” State, Etc. v. District Court, Etc. (1979), . . . Mont. . . ., 591 P.2d 656, 662, 36 St.Rep. 489, 496, and cases therein cited. “The intention of the legislature must first be determined from the plain meaning of the words used and if the meaning of the statute can be so determined, the courts may not go further and apply any other means of interpretation.” State, Etc. v. District Court, Etc., supra.
Applying these rules we hold that section 46-18-201(l)(a), MCA, allows the District Court to revoke a deferred sentence for any felony only during the three-year period immediately following the initial sentence deferral. This three-year period cannot be extended by an order of the District Court. The District Court can impose conditions of probation during the time of deferment which are not in contradiction to the deferred sentence, but the court cannot extend the period of deferment beyond the maximum three-year period mandated by section 46-18-20l(l)(a), MCA.
In this action the maximum period for revoking a deferred sentence had elapsed and the District Court no longer had jurisdiction at the time it sentenced the petitioner to serve five years in the State Prison for the original crime of aggravated assault. Since the District Court had lost its jurisdiction, the sentence imposed by it is void.
Accordingly the write of habeas corpus is granted, and the respondent is directed to release petitioner from confinement in the State Prison forthwith absent independent grounds for holding petitioner in custody.
MR. JUSTICES HARRISON, SHEA, WEBER and MORRISON concur.