
262 Kan. 524 (1997)
941 P.2d 365
STATE OF KANSAS, Appellant,
v.
RUSSELL A. VANWEY, Appellee.
77,562.
Supreme Court of Kansas.
May 30, 1997.
Gunnar A. Sundby, special assistant county attorney, argued the cause, and Allen A. Ternent, county attorney, and Carla J. Stovall, attorney general, were on the brief for appellant.
Robert J. Bednar, of Duncan-Senecal Law Offices, Chtd., of Atchison, argued the cause, and Richard P. Senecal, of the same firm, was on the brief for appellee.
The opinion of the court was delivered by
LARSON, J.:
The State of Kansas appeals the trial court's ruling denying the State's motion to set aside an agreed nunc pro tunc *525 order which changed Russell A. Vanwey's 1992 sentence from consecutive to concurrent. We hold the trial court erroneously refused to set aside its nunc pro tunc order, jurisdiction did not exist for a nunc pro tunc order to be issued, and the original sentence remains in full force and effect.
Facts
On March 26, 1992, Vanwey pled guilty to charges of an aggravated weapons violation, K.S.A. 21-4202 (Ensley 1988), a class E felony; criminal trespass, K.S.A. 21-3721 (Ensley 1988), a class B misdemeanor; and intimidation of a witness, K.S.A. 21-3832 (Ensley 1988), a class B misdemeanor.
Vanwey was sentenced on May 4, 1992, to 1 to 5 years' imprisonment for the aggravated weapons violation, with said sentence to "run consecutively with any other prior felony sentences not suspended for which the Defendant was on parole at the time of this offense." The sentence for trespassing was a jail term in the Atchison County Jail for 6 months, to run concurrent with the felony charge, and the intimidation of a witness sentence was 1 year in the Atchison County Jail, again concurrent with the previous sentences.
Over 3 years later, in August 1995, Vanwey filed a pro se motion asking for credit for time served. A hearing was held with the motion only briefly discussed, but Vanwey's counsel stated: "It is my intention to try and convert the consecutive to concurrent pretty soon." The county attorney indicated that if a sentencing mistake had been made, the State would not object to a nunc pro tunc order correcting a clerical error.
Subsequently, Vanwey's counsel moved for a nunc pro tunc order requesting amendment of the May 1992 sentence to reflect that the sentence was concurrent with, rather than consecutive to, prior sentences for which defendant was on parole at the time of this offense.
The matter was twice set for hearing, and both times continued, but ultimately, with other counsel from the initial counsels' offices appearing, a nunc pro tunc order was submitted. With the apparent agreement of both counsel, the trial court signed the order which *526 provided the sentence of May 4, 1992, should be amended to read as follows: "said sentence to run concurrently with any other prior felony sentences not suspended for which the Defendant was on parole at the time of this offense."
Sometime after learning of the nunc pro tunc order, a victim wrote the Disciplinary Administrator and the Attorney General questioning the propriety of the order and representations of Vanwey's counsel. The Disciplinary Administrator's office requested a legal opinion from the Attorney General, who responded that "after reviewing the evidence in this case, there does not appear to be any difference between the oral sentence imposed by the court on May 4th, 1992 and the journal entry which memorialized the sentence imposed by the court." The opinion letter also pointed out the concurrent sentence violated the mandatory consecutive provisions of K.S.A. 1991 Supp. 21-4608; the court did not have jurisdiction to modify the sentence under K.S.A. 1991 Supp. 21-4603(4)(a), as more than 120 days had elapsed since Vanwey's sentence was imposed; and the nunc pro tunc order was not proper under K.S.A. 22-3504(2), which allows for the correction of clerical errors.
On July 24, 1996, the State moved to set aside the nunc pro tunc order on the basis that the modification had been misrepresented as necessary to correct a clerical error and that the court had no jurisdiction to modify the sentence. The trial court ruled that relief would have to be through appeal and denied the motion.
The State appealed this ruling to the Court of Appeals. The case was transferred to us pursuant to K.S.A. 20-3018(c).
Arguments and authorities
We first acknowledge the motions to dismiss filed by Vanwey, contending that appeals by the State are not permitted under circumstances as here exist. This contention has no merit. In State v. Scherzer, 254 Kan. 926, 869 P.2d 729 (1994), the State appealed the trial court's order allowing the defendant to serve his 90 days of imprisonment by house arrest. After issuing a show cause order requesting the State to establish the jurisdictional basis for the State's appeal, we held that jurisdiction existed and stated:

*527 "The State characterizes its appeal as whether the sentence imposed by the district court is illegal. This court has previously accepted an appeal by the State alleging an illegal sentence, albeit without explaining the jurisdictional authority for our review of the sentence imposed. See State v. Keeley, 236 Kan. 555, 694 P.2d 442 (1985). We note this court has general statutory jurisdiction to correct, modify, vacate, or reverse any act, order, or judgment of a district court in order to assure that any such act, order, or judgment is just, legal, and free of abuse. K.S.A. 1993 Supp. 60-2101(b). The court also has specific statutory jurisdiction to correct an illegal sentence at any time. K.S.A. 22-3504. We have jurisdiction to consider the State's appeal." 254 Kan. at 929-30.
In State v. Ruff, 252 Kan. 625, 628, 847 P.2d 1258 (1993), we implicitly recognized our authority to review an illegal sentence, which we defined as
"either a sentence imposed by a court without jurisdiction; a sentence which does not conform to the statutory provision, either in the character or the term of the punishment authorized; or a sentence which is ambiguous with respect to the time and manner in which it is to be served. State v. Frazier, 248 Kan. 963, Syl. ¶ 4, 811 P.2d 1240 (1991)."
In Ruff, the sentence appealed from was properly entered. As there was no other statutory authority for the State's appeal, we therefore concluded that we did not have jurisdiction over the issue raised by the State on appeal.
In this case, exactly the opposite situation exists. If we determine the trial court lacked jurisdiction to enter the nunc pro tunc order which altered Vanwey's sentence, we must conclude the modified sentence is illegal. We, as do trial courts, have jurisdiction to correct an illegal sentence. We may exercise jurisdiction over this appeal.
All of the questions involved in this appeal are matters of law over which our review is unlimited. State v. Roderick, 259 Kan. 107, 110, 911 P.2d 159 (1996).
The question appealed from is whether the trial court erred in refusing to set aside the nunc pro tunc order. However, our analysis ultimately leads to the question of whether the trial court possessed jurisdiction to grant the nunc pro tunc order in the first place. If the court lacked such jurisdiction, the failure to set aside the order is clearly erroneous. Under the authority of K.S.A. 22-3504 and K.S.A. 60-2101(b), as announced in Scherzer, we always have authority to vacate an order to assure that it is just, legal, and free *528 from abuse. If the trial court lacked jurisdiction to grant a nunc pro tunc order, we may vacate that order regardless of whether the question before us is a direct appeal of the order or an attack on the order through the failure to grant a motion to set aside the order.
It is apparent the journal entry modification here does not fall within those allowed by K.S.A. 22-3504(2), which grants authority for a court to correct clerical errors. This statute reads: "Clerical mistakes in judgments, orders or other parts of the record and errors in the record arising from oversight or omission may be corrected by the court at any time and after such notice, if any, as the court orders."
The record clearly shows the nunc pro tunc order did not correct any omission or clerical error. What the order actually did was change a statutorily directed consecutive sentence properly entered into a concurrent sentence without any basis or justification. The record reflects the sentence entered by the court in May 1992 was correctly memorialized in the journal entry. Under the facts of this case, there was nothing the trial court could correct pursuant to 22-3504(2). In State v. Thomas, 239 Kan. 457, 720 P.2d 1059 (1986), we held the trial court did not err in denying defendant's motion to correct sentence when there was no error in the judgment that could have been corrected under K.S.A. 22-3504(2). Such should have been the case here.
Nor does the agreement of the parties and the presentation of an agreed order to the trial court bring life into an otherwise invalid action. In State v. Grimsley, 15 Kan. App.2d 441, 808 P.2d 1387 (1991), the Court of Appeals held the defendant's agreement with the State to extend probation beyond the maximum provided by law had no legal effect. The Grimsley court stated: "Pursuant to 22-3716(1), revocation must occur during the probationary term. This is a jurisdictional requirement which cannot be waived by estoppel or agreement of the parties." 15 Kan. App.2d at 444.
In State v. Christensen, 166 Kan. 152, 156, 199 P.2d 475 (1948), we said: "[N]o stipulation of the parties or consent thereto by the court can change the statute or affect its applicability." Such is equally true here. We conclude that parties agreeing to a nunc pro *529 tunc order cannot invest the court with the power to change a sentence if the court otherwise lacks jurisdiction to do so.
It is clear that the trial court could not change Vanwey's sentence from consecutive to concurrent through a nunc pro tunc order, but we also must ascertain if it otherwise had power to do so. The statute in effect at the time of Vanwey's crime, K.S.A. 1991 Supp. 21-4603(4)(a), states in applicable part:
"Except when an appeal is taken and determined adversely to the defendant as provided in subsection (4)(b), at any time within 120 days after a sentence is imposed, after probation or assignment to a community correctional services program has been revoked, the court may modify such sentence, revocation of probation or assignment to a community correctional services program by directing that a less severe penalty be imposed in lieu of that originally adjudged within statutory limits and shall modify such sentence if recommended by the Topeka correctional facility unless the court finds and sets forth with particularity the reasons for finding that the safety of members of the public will be jeopardized or that the welfare of the inmate will not be served by such modification."
In State v. Saft, 244 Kan. 517, Syl. ¶ 1, 769 P.2d 675 (1989), we said:
"The sentencing of a criminal defendant is strictly controlled by statute in Kansas. The time limits of the statutes are jurisdictional. District courts do not have jurisdiction to modify a sentence pursuant to a motion filed after 120 days from the original imposition of sentence, barring those exceptions stated in K.S.A. 21-4603(3)."
Although subsequent decisions regarding 21-4603 have discussed situations where appeals were filed following sentencing, see State v. Waterbury, 258 Kan. 614, 907 P.2d 858 (1995); State v. Smith, 254 Kan. 16, 864 P.2d 1208 (1993); and State v. Hervey, 19 Kan. App.2d 498, 873 P.2d 188, rev. denied 255 Kan. 1005 (1994), our decisions have uniformly held that after the 120-day modification period expires, a modification may not be entered because the jurisdiction to do so no longer exists, even if circumstances would have previously justified the modification.
In addition to the fact that the trial court lacked jurisdiction to modify Vanwey's 1992 sentence, at the time of Vanwey's crime, K.S.A. 1991 Supp. 21-4608(3) provided:

*530 "Any person who is convicted and sentenced for a crime committed while on probation, assigned to a community correctional services program, on parole or on conditional release for a felony shall serve the sentence consecutively to the term or terms under which the person was on probation, assigned to a community correctional services program or on parole or conditional release." (Emphasis added.)
The sentencing court was clearly required to order Vanwey's sentences to run consecutive to his prior sentence for which he was on parole. It did so. As such, the record reveals that the trial court entered thecorrect mandatory sentence.
Vanwey's argument that we have no jurisdiction to modify his sentence because it is now running concurrently and the imposition of a consecutive sentence would be a harsher sentence has no merit. This contention was refuted in Barr v. State, 8 Kan. App. 2d 173, 175, 651 P.2d 975, rev. denied 232 Kan. 875 (1982), where the court declared: "[T]he trial court's reinstatement of a legally entered sentence to correct an illegal sentence modification does not constitute double jeopardy." A court has authority to reinstate an original sentence when a subsequent modification is illegal.
Based on the clear case law and statutory provisions, we reverse the trial court's refusal to set aside its nunc pro tunc order. We find the nunc pro tunc order was entered without jurisdiction. We order the reinstatement of the trial court's May 4, 1992, sentence.
Reversed and remanded with instructions.
