
269 Kan. 594 (2000)
7 P.3d 294
STATE OF KANSAS, Appellee,
v.
RORIE G. JOHNSON, Appellant.
No. 82,221.
Supreme Court of Kansas.
Opinion filed July 14, 2000.
Stephen B. Plummer, of Wichita, was on the brief for appellant.
Boyd K. Isherwood, assistant district attorney, Nola Foulston, district attorney, and Carla J. Stovall, attorney general, were on the brief for appellee.
The opinion of the court was delivered by
MCFARLAND, C.J.:
Rorie G. Johnson appeals the district court's summary dismissal of his motion to correct an illegal sentence.

FACTS
In 1985 defendant was charged with two counts of rape; two counts of aggravated kidnapping; two counts of aggravated battery; and one count of aggravated criminal sodomy. These charges constituted two class A felonies, three class B felonies, and two class C felonies. Under a plea agreement defendant pled guilty to two counts of rape, one count of aggravated battery, and one count of kidnapping (reduced from aggravated kidnapping). Thus, defendant pled guilty to three class B felonies and one class C felony. The *595 remaining three counts were dismissed. Additional provisions of the plea agreement were that the State would recommend a controlling sentence of 8 years to life imprisonment and would not seek imposition of the Habitual Criminal Act.
The charges involved two separate incidents. In one incident, defendant sought entry into the victim's home by asking to use the telephone. Once inside, defendant assaulted the victim in the presence of her child. In the second incident, defendant sought a ride from two women at a laundromat. Defendant then threatened the women with a knife, made them drive to various places, and assaulted them.

Sentencing
During the preparation of the presentence investigation (PSI) report, defendant gave a lengthy and detailed description of the crimes, basically indicating that the sexual assaults were consensual or were opportunities he just could not resist. Additionally, defendant told the court services officer (CSO) that he had committed two other rapes for which he had not been charged. The CSO believed the sentences recommended pursuant to the plea agreement were "not appropriate" and should be "disregarded" by the court.
During sentencing, Judge D. Keith Anderson indicated at the outset that, given the information contained in the PSI report, he was not inclined to follow the negotiated plea agreement. The State corrected defense counsel's characterization of the facts surrounding the incidents, specifically noting that violence was involved in the rapes and that one rape was committed in the presence of a small child. Later, the State indicated that defendant's revelation concerning two additional uncharged rapes was also "cause for concern." Nevertheless, the State indicated that it had no intention of backing out on the plea agreement and recommended that the court impose a controlling sentence of 8 years to life imprisonment. Defense counsel complained of the State arguing the facts harshly while recommending the negotiated sentence.
While indicating he was a strong believer of negotiated plea agreements, the sentencing judge stated he was troubled by the *596 sentence recommended in this case. Specifically, the court noted concerns with the information in the PSI report, the CSO recommendation, and the facts and circumstances of the incidents. After a lengthy recitation of its concerns, the court sentenced defendant to a controlling term of 30 years to life imprisonment.
The post-sentencing history of the case is complex and must be set forth in considerable detail.

First Motion to Modify
Defendant filed a motion to modify sentence. The motion was considered at a December 31, 1985, hearing, after receipt of the State Reception and Diagnostic Center (SRDC) report. The SRDC report indicated that defendant was not a suitable candidate for probation, should be viewed as "a very dangerous antisocial man" with a high likelihood of engaging in antisocial, probably violent behavior in the future, and recommended defendant serve an appropriate sentence. Defendant argued that the negotiated sentence should be followed by the court and the sentence modified to reflect that agreement. The State argued the SRDC report was very negative, much trauma had been caused to the victims, and that the PSI report had also painted a very negative picture of defendant. The State urged the court to deny the motion. Defendant argued that the State's argument was contrary to the plea agreement.
Judge Anderson noted that both parties had argued at sentencing for a sentence in accordance with the plea agreement. The judge denied the motion to modify, stating that he had refused to follow the agreement on his own initiative given the facts of the case and the information in the PSI report.

Direct Appeal
Defendant appealed his sentences and the denial of his motion to modify to the Kansas Supreme Court. This court affirmed his sentences and the denial of his motion to modify. State v. Johnson, No. 59,056, unpublished opinion filed December 5, 1986.
On appeal, defendant argued that the district court abused its discretion in sentencing by disregarding the plea agreement and considering two uncharged rapes. We disagreed, noting that the *597 district court gave careful consideration to the plea agreement and reluctantly overrode it in the face of the poor prognosis reflected in the PSI report and in the strong recommendation of the CSO. Consideration of the uncharged rapes was appropriate. Finally, given that the SRDC report painted an even "darker and more grim" picture of defendant than did the PSI report, the district court did not abuse its discretion in failing to modify defendant's sentence. In his brief defendant argued, inter alia, that "the State backed out on its end of the bargain after Mr. Johnson pled guilty." No analysis or authority for this claim was made.

Second Motion to Modify
Defendant then filed a second motion to modify. Hearing was held on the motion on January 16, 1987. Defense counsel argued that defendant was offered a plea agreement that was not followed by the court when sentence was imposed and that if the court was not going to follow the agreement, the plea should have been renegotiated. The State argued that the sentence was appropriate given the SRDC report. At this juncture, defense counsel indicated he believed the State was violating its plea agreement by not arguing for modification of the sentence to the agreed-on recommended sentence. In denying the motion, Judge Anderson stated:
"Well, I am not going to make lengthy comments. I did at the time this matter was passed on for sentencing purposes and the motion to modify that sentence, and I will reaffirm the same thinking, rationale and conclusions the Court drew at those times...."

Motion to Withdraw Plea
Defendant then filed a motion to withdraw his guilty plea. At the April 16, 1987, hearing thereon, defendant acknowledged that, at sentencing, the State had recommended a controlling sentence of 8 years to life. Defendant stated that the reason he wanted to withdraw his plea was because he did not get a sentence of 8 years to life. Defendant and his attorney also argued that the two uncharged rapes did not occur.
During closing arguments, the defense attorney argued that the State violated the plea agreement by arguing against the motion to modify sentence and that, further, defendant was denied his right *598 to due process when the State agreed to recommend a sentence, knowing that it was so low the district court was unlikely to impose it.
Judge Anderson denied the motion to withdraw plea, noting that this was an unusual case given the details defendant provided in the PSI report and the tenor of the SRDC report. Further, Judge Anderson found that the State did not violate the plea agreement. Judge Anderson again indicated that, given the facts of this case, he would not have changed the sentence regardless of any position taken by the district attorney.

Appeal of the Motion to Withdraw Guilty Plea
Defendant appealed the denial of his motion to withdraw his guilty plea.
The docketing statement in that appeal (State v. Johnson, No. 60,853) indicates that defendant intended to raise the question of whether the State had reneged on the plea agreement by refusing to recommend the 8-year to life sentence during the motion to modify hearing. This appeal was dismissed upon receipt of notice signed by defendant seeking its dismissal.

Motion to Correct Illegal Sentence
On June 9, 1998, defendant filed a pro se motion to correct illegal sentence, alleging inter alia that the State violated the plea agreement regarding sentencing.
Judge Anderson summarily denied the motion, concluding that all of the issues raised by defendant had previously been addressed by the court or ruled on by the appellate courts or should have been raised and determined in a prior appeal, and, thus, defendant was not entitled to any relief.

The Appeal Now Before This Court
Defendant appeals the summary denial of his motion to correct illegal sentence.

ISSUE
The sole issue before us is whether the district court erred in denying defendant's pro se motion to correct an illegal sentence *599 without: (1) appointing counsel and (2) setting the motion for hearing. Defendant relies on K.S.A. 22-3504(1), which provides:
"The court may correct an illegal sentence at any time. The defendant shall receive full credit for time spent in custody under the sentence prior to correction. The defendant shall have a right to a hearing, after reasonable notice to be fixed by the court, to be personally present and to have the assistance of counsel in any proceeding for the correction of an illegal sentence."
Defendant argues that the statute grants an absolute right to counsel and a hearing and that the court's summary dismissal of the motion was error.
A like argument was raised in State v. Duke, 263 Kan. 193, 946 P.2d 1375 (1997). In rejecting this claim, we stated:
"In State v. Nunn, 247 Kan. 576, 802 P.2d 547 (1990), a claim was made that the district court was required to appoint counsel for defendant on a motion for new trial filed later than 10 days after trial. The motion was based upon alleged newly discovered evidence, a ground K.S.A. 22-3501(1) affords a 2-year filing period.
"We rejected this argument, holding:
`While it would simplify matters for all courts and litigants if we were to adopt a bright-line rule that counsel be appointed for all post-trial motions, such a rule would not appear to be feasible or justified. Obviously, counsel should be appointed in cases where the motion raises substantial questions of law or triable issues of fact requiring an evidentiary hearing, legal arguments, and/or briefs of the parties. It appears just as obvious that if the motion, whether or not it is the defendant's first based upon newly discovered evidence, fails to state any substantial issues of law or fact, or states sufficient facts to allow a determination based upon the motion itself, then appointment of counsel and the holding of a hearing would be unwarranted. We adhere to our prior rulings that the determination of whether to appoint counsel and hold a hearing on post-trial motions not filed "within 10 days after the verdict or finding of guilty, or within such further time as the court may fix during the 10-day period," is one best left to the sound discretion of the trial court considering all the circumstances of the particular case. If the trial court correctly determines from the pleadings and record that the motion raises no substantial questions of law or fact, then the refusal to appoint counsel and hold a hearing does not constitute an abuse of discretion.' 247 Kan. at 584-85.
"The language authorizing preliminary judicial examination to determine whether or not substantial questions of law or fact are raised appears in K.S.A. 22-4506, which provides in pertinent part:
`(a) Whenever any person who is in custody under a sentence of imprisonment upon conviction of a felony files a petition for writ of habeas corpus or a motion *600 attacking sentence under K.S.A. 60-1507 and files with such petition or motion such person's affidavit stating that the petition or motion is filed in good faith and that such person is financially unable to pay the costs of such action and to employ counsel therefor, the court shall make a preliminary examination of the petition or motion and the supporting papers.
`(b) If the court finds that the petition or motion presents substantial questions of law or triable issues of fact and if the petitioner or movant has been or is thereafter determined to be an indigent person as provided in K.S.A. 22-4504 and amendments thereto, the court shall appoint counsel....'
"Our decisions have been quite uniform in upholding the propriety of such preliminary examinations on all post-trial motions filed later than 10 days after trial. There is no indication that a motion to correct an illegal sentence was intended by the legislature to be treated differently from a K.S.A. 60-1507 attack upon a sentence. Logic does not require a different treatment. What purpose is served if, unlike another post-trial motion, the filing of a bare-bones conclusory motion to correct an allegedly illegal sentence triggers a full-blown hearing with defense counsel and the presence of the defendant? We believe the key words in K.S.A. 22-3504(1) relative to the issue before us are `any proceeding.' The district court should make the preliminary examination as to whether substantial questions of law or fact are raised. If the findings are in the negative, the court should summarily deny the motion. This is not a `proceeding' within the language of the statute. If the findings are in the affirmative, then the matters can only be resolved in a `proceeding' as set forth in the statute.
....
"In summary, we hold K.S.A. 22-3504(1) does not eliminate a district court's duty to preliminarily examine a motion to correct an allegedly illegal sentence to determine if substantial issues of law or fact are raised. If no such issues are found to have been raised, the motion may be summarily dismissed." 263 Kan. at 195-96.
State v. Duke is clearly controlling.
This brings us to the second aspect of this issue wherein defendant contends his motion raises a substantial issue. We disagree. As we also stated in State v. Duke:
"We have defined an illegal sentence as 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. Carmichael v. State, 255 Kan. 10, 16, 872 P.2d 240 (1994); State v. Ruff, 252 Kan. 625, 628, 847 P.2d 1258 (1993); see State v. Scherzer, 254 Kan. 926, Syl. ¶ 1, 869 P.2d 729 (1994)." 263 Kan. at 194.
*601 Defendant's claim of illegality is that, during the hearing on the first motion to modify (December 31, 1985), the State made statements inconsistent with its plea bargain obligation to recommend an 8-year to life controlling sentence. Without passing on the merits of whether the State made statements inconsistent or contrary to its plea agreement, it is clear that the claimed illegality does not fit within the definition of "illegal sentence" as contemplated by K.S.A. 22-3504(1). Accordingly, the motion to correct an illegal sentence did not raise a substantial issue. No error or abuse of discretion is shown in the district court's summary dismissal of the motion herein.
Before concluding, we should address another aspect of this issue. The district court based its summary dismissal on the fact that the defendant's sole claim of illegal sentence was based on the State's alleged violation of the plea agreement an issue that had been raised in prior appeals. As previously noted, this is a correct statement. The defendant had raised the issue in his brief filed in his direct appeal, although in a perfunctory manner. This issue was the sole issue of defendant's appeal of the denial of his motion to withdraw his guilty plea. Defendant had voluntarily dismissed this appeal.
In State v. Neer, 247 Kan. 137, 140-41, 795 P.2d 362 (1990), we held, under Kansas law, where an appeal is taken from the sentence imposed and/or a conviction, the judgment of the reviewing court is res judicata as to all issues actually raised, and those issues that could have been presented, but were not presented, are deemed waived. Where a defendant's claim has not been raised at trial or on direct appeal, such a default prevents the defendant from raising the claim in a second appeal or a collateral proceeding. We also noted that a sentence imposed by the district court which is within the lawful limits will be overturned on appellate review only where there is an abuse of discretion or the sentence was the result of partiality, prejudice, or corrupt motive. 247 Kan. at 139.
We also note that in State v. Edwards, 260 Kan. 95, 917 P.2d 1322 (1996), the defendant had raised two claims of error in his direct appeal. After briefs were filed and oral arguments heard, but before the filing of the opinion, defendant filed a written motion *602 to have the issue concerning his motion to withdraw his guilty pleas withdrawn from his appeal. Later, defendant filed a motion for correction of illegal sentence, raising the same issue. The district court denied the motion and this court affirmed, holding:
"It is well settled that an issue neither briefed nor argued on appeal is deemed to have been abandoned. State v. Pratt, 255 Kan. 767, Syl. ¶ 4[, 876 P.2d 1390 (1994)]; State v. Wacker, 253 Kan. 664, 670, 861 P.2d 1272 (1993); State v. Uims, 222 Kan. 335, 564 P.2d 531 (1977). In such circumstances, nonaction is considered to constitute abandonment. Here, more than nonaction is involveddefendant took specific action to withdraw the issue from consideration. Defendant did not want the issue determined because of possible adverse ramifications of being successful on this claim of error. Does withdrawal of an issue equate to saving it for later? We think not. We conclude that the withdrawal of the claim of error from consideration in the direct appeal constitutes abandonment of the claim of error. The withdrawn claim of error cannot be the basis for a second appeal." 260 Kan. at 98.
K.S.A. 22-3504 permits a claimed imposition of an illegal sentence to be raised at any time. However, its applicability is very narrow as demonstrated by our definition thereof in State v. Duke. Further, the statute may not be used as a vehicle to breathe new life into appellate issues previously abandoned or adversely determined.
The judgment is affirmed.
