The opinion of the court was delivered by
Prager, J.:This is an appeal in a criminal action from an order of the district court denying the motion of the defendant, Leburn Howard Timmerman, to modify his sentence. The district court held that it lacked jurisdiction to hear the motion, because the motion was not timely filed.
The facts in the case are undisputed and are as follows: The defendant, Leburn Howard Timmerman, entered a plea of guilty to one count of rape (K.S.A. 21-3502) and one count of kidnapping (K.S.A. 21-3420) on December 17, 1981. Sentence was imposed on January 21, 1982, at which time the court sentenced the defendant to two concurrent terms of fifteen years to life. On April 8, 1982, defendant filed a motion to reduce the sentence, which was denied on April 15, 1982. The defendant then appealed his sentence to the Supreme Court of Kansas on May 13, 1982. Thereafter the defendant filed his voluntary motion to dismiss the appeal. The appeal was dismissed on September 14, 1982.
On October 4, 1982, the defendant filed a separate action pursuant to K.S.A. 60-1507 collaterally attacking the decisions of the lower court in the criminal case just discussed. On October 5, 1982, the district court found that the files and records in the criminal case and the civil case showed that the petitioner/defendant was entitled to no relief. Thereafter, Timmerman ap*415pealed that judgment to the Court of Appeals. On October 6, 1983, the Kansas Court of Appeals affirmed. The mandate of the Court of Appeals was filed with the district court on November 14,1983. Within 120 days of the appellate court’s mandate in the 60-1507 action, Timmerman filed another motion to modify sentence in the original criminal case. A hearing was held on this motion. The State contended that the district court was without jurisdiction to entertain the defendant’s motion, because the judgment of sentence had become final under K.S.A. 21-4603(3), which provides in part as follows:
“21-4603. Authorized dispositions.
“(3) Any time within 120 days after a sentence is imposed or within 120 days after probation has been revoked, the court may modify such sentence or revocation of probation by directing that a less severe penalty be imposed in lieu of that originally adjudged within statutory limits. If an appeal is taken and determined adversely to the defendant, such sentence may be modified within 120 days after the receipt by the clerk of the district court of the mandate from the supreme court or court of appeals. Upon hearing, the court may reduce the minimum term of confinement at any time before the expiration thereof when such reduction is recommended by the secretary of corrections and the court is satisfied that the best interests of the public will not be jeopardized and that the welfare of the inmate will be served by such reduction. The power here conferred upon the court includes the power to reduce the minimum below the statutory limit on the minimum term prescribed for the crime of which the inmate has been convicted.” (Emphasis supplied.)
The defendant maintained that his motion to modify was filed within 120 days after the order of the Court of Appeals in his collateral action filed pursuant to K.S.A. 60-1507. Therefore, he argues, the district court still had jurisdiction to entertain the motion to modify sentence in the original criminal case.
The district court denied the motion to modify the sentence on the basis that it lacked jurisdiction to hear the motion because it was not timely filed under K.S.A. 21-4603(3). The trial court reasoned that, by the enactment of K.S.A. 21-4603, the legislature intended the appeal referred to in that section to mean a direct appeal from the conviction and sentence and not an appeal in a collateral attack such as habeas corpus or a proceeding under K.S.A. 60-1507. The defendant appealed to this court.
The sole issue presented on appeal is this: Under K.S.A. 21-4603(3), does a district court have jurisdiction to modify a sentence during the 120-day period following the determination *416of an appeal in a collateral proceeding brought pursuant to K.S.A. 60-1507? We agree with the trial court that it does not.
The statute clearly contemplates a continuing jurisdiction in a district court to modify the sentence in cases where a direct appeal is taken from the conviction and sentence. It does not apply in cases where an appeal is taken in a collateral proceeding filed pursuant to K.S.A. 60-1507. K.S.A. 60-1507 affords a prisoner in custody a collateral remedy where a sentence was imposed in violation of the Constitution or the laws of the United States or of the State of Kansas, or where the sentencing court was without jurisdiction to impose the sentence, or where the sentence was in excess of the maximum authorized by law, or is otherwise subject to collateral attack. A motion under K.S.A. 60-1507 may be filed at any time while the prisoner is in custody and under sentence. Clearly, a proceeding under K.S.A. 60-1507 is not an appeal in the criminal case in which the sentence was imposed. If the defendant’s construction of K.S.A. 21-4603(3) were correct, a district court would never lose jurisdiction to modify a sentence, because at any time a prisoner in custody could file a motion pursuant to K.S.A. 60-1507 and revest in the sentencing court the jurisdiction to modify the sentence. To interpret the statute in that way would make impossible any degree of finality in criminal litigation.
This court addressed the finality concept in Hacker v. State, 207 Kan. 195, 197, 483 P.2d 484 (1971), where it is stated:
“[T]his court is concerned with the seemingly endless piecemeal litigation which petitioner has carried on as an indigent defendant. We have examined the record and find no unusual circumstances or intervening changes in the law which prevented petitioner from being aware of and raising all of his alleged trial errors in the direct appeal of his case to this court. Some degree of finality in the criminal appeal process must be achieved to prevent endless piecemeal litigation in both the state and federal courts.” (Emphasis supplied.)
We hold that under K.S.A. 21-4603(3), a defendant in a criminal proceeding has 120 days after his direct appeal has been finally determined in which to file a motion to modify his sentence. The time for filing a motion to modify a sentence in the criminal action is not extended by the filing of a collateral proceeding pursuant to K.S.A. 60-1507.
The judgment of the district court is affirmed.