OPINION OF THE COURT
Kaye, J.This appeal centers on the technical legality of the sentence imposed on defendant — concurrent terms of probation for gun possession — and particularly on mitigation provisions of the Penal Law (see, § 70.02 [2] [c] [i]; [5] [b]). While agreeing with the Appellate Division that mitigation was improper here, we reach that conclusion on different grounds.
Defendant, who was serving a three-year sentence of probation imposed by a New Jersey court for marihuana possession, was arrested in New York City and charged with third degree unlawful possession of a weapon (Penal Law § 265.02) and resisting arrest (Penal Law § 205.30). At the time of the arrest, defendant was in possession of a fully loaded automatic pistol that had been defaced — the serial number removed— and showed evidence of recent discharge. While on bail, defendant was arrested a second time and again charged with unlawful possession of a fully loaded .38 caliber revolver. This gun had been reported stolen and also showed evidence of recent discharge. Defendant’s companion, a predicate felon, was charged with possession of a loaded .38 special Colt revolver.
A plea bargain was arranged covering both indictments and as a result defendant withdrew his suppression motions. Although the presumptive minimum sentence for possession of a loaded firearm is one year in prison, the court in accepting defendant’s plea suggested disposing of both indictments with a "split” sentence of six months in prison and 4 Vi years’ probation, because a one-year prison term might be "unduly harsh.”
At sentencing some time later, the People opposed the suggested sentence, citing defendant’s arrest while on probation for the New Jersey conviction. In an apparent response to *284the People’s contention, the court indicated it would mitigate the sentence based on the manner in which the crime was committed.
After a four-month adjournment of the sentencing, the court again stated its intention to mitigate the mandatory sentence based on the manner in which the crime was committed. In placing its reasons on the record, the court mentioned the circumstances surrounding the two police stops, noted the "strong likelihood that the weapons would not have been admissible at the trial,” and concluded that in all probability the People "would not have been able to sustain their burden of proof of probable cause.” The court then explicitly found mitigating circumstances "bearing directly on the manner in which the crimes were committed,” and imposed two concurrent five-year sentences of probation.
That was not a permissible sentence under the statute.
A person found guilty of criminal possession of a loaded handgun outside the home or place of business must be sentenced either to an indeterminate sentence of at least one to three years in prison, or to a definite prison term of no less than one year (Penal Law § 70.02 [2] [c]; see, Governor’s Mem, June 13, 1980, 1980 McKinney’s Session Laws of NY, at 1857). Two provisions allow the court discretion to reduce the mandatory sentence.
The first applies where the sentence would be unduly harsh given the nature and circumstances of the crime and the history and character of the defendant (Penal Law § 70.02 [2] [c] [i]). Mitigation under this section is permitted only if the defendant has not been convicted of a class A misdemeanor as "defined in this chapter” within the five years immediately preceding the commission of the gun possession offense.
Second, even if a defendant has committed such a disqualifying misdemeanor, a court may nevertheless impose a less severe sentence if it finds at least one of three enumerated factors: "(i) mitigating circumstances that bear directly upon the manner in which the crime was committed; or (ii) where the defendant was not the sole participant in the crime, the defendant’s participation was relatively minor although not so minor as to constitute a defense to the prosecution; or (iii) possible deficiencies in proof of the defendant’s commission of an armed felony.” (Penal Law § 70.02 [5] [b].)
The minutes indicate that after the prosecutor mentioned defendant’s prior New Jersey conviction, the trial court — ap*285parently concluding that Penal Law § 70.02 (2) (c) (i) could not be the basis for mitigation — turned immediately to section 70.02 (5) (b) and grounded its decision to mitigate on the manner in which the crime was committed.
We therefore first consider whether the circumstances presented furnished a valid basis for mitigation under Penal Law § 70.02 (5) (b) (i).
The Appellate Division concluded that the Trial Judge applied section 70.02 (5) (b) (iii) — "possible deficiencies in proof’ — and held that possible police misconduct could not be a basis for mitigation under that provision. However, it is evident from examination of the record that the Trial Judge relied on mitigating circumstances bearing upon the manner in which the crime was committed (Penal Law § 70.02 [5] [b] [i]), not possible deficiencies in proof (Penal Law § 70.02 [5] [b] [iii]). The court repeatedly referred to the manner in which the crime was committed; by contrast, no findings are evident as to what the "possible deficiencies in proof’ might be.
Nevertheless, the trial court’s application of the mitigation provisions based on the manner in which the crime was committed must also be rejected.1
"Enacted at an extraordinary session of the Legislature as a 'key’ part of a program intended to combat violent crime, section 70.02 of the Penal Law was intended to establish greater responsibility for an armed violent felony through stiffer sentencing provisions and restrictions upon plea bargaining. * * * The Legislature did not choose to abolish plea bargaining as it could have * * *. Rather it opted to limit the broad discretion previously exercised in the determination of the crime to be pleaded to and the sentence to be imposed.” (People v Felix, 58 NY2d 156, 161-162, appeal dismissed 464 US 802.) The dearth of appellate precedent under Penal Law § 70.02 (5) (b) suggests that, during the past 12 years since enactment of the statute, there has been little difficulty applying it.
Given the legislative intent to limit "the discretion available to [prosecutors and courts] where the legislature feels strongly that no mitigating circumstance should permit erosion of the specified mandatory-minimum sentence” (Mem in Support of 1980 NY Assembly Bill A 11309, at 3, in Bill Jacket for L *2861980, ch 233), the mitigation provisions should be narrowly construed.
That the statute was not complied with in the present case is amply demonstrated by the record of the sentencing proceedings. Little attention was paid to making clear the particular basis for mitigation; only Penal Law § 70.02 was mentioned as the statutory authorization for the sentence. A better procedure, one facilitating appellate review in the rare case it becomes necessary, would be for trial courts to set forth in the record the statutory ground being relied on and the circumstances of the case supporting that reliance.
Because that procedure was not followed in the present case, and because the existing record demonstrates that the trial court improperly applied the statute over the People’s objection, the sentence must be vacated with leave to defendant to withdraw his pleas. The mitigating circumstances, under Penal Law § 70.02 (5) (b) (i), must relate to defendant’s conduct in committing the crime, not the conduct of the police in effecting the arrest. Whether the officers involved had probable cause to stop defendant, or his cooperation in the arrest, is irrelevant to the manner in which he committed the crime of criminal possession of a weapon.
That conclusion does not end the matter, however, since the Appellate Division remanded with instructions to the trial court to determine whether defendant’s New Jersey conviction would have been a class A misdemeanor if committed in New York for purposes of defendant’s qualification for the "unduly harsh” exception to the mandatory sentence. This was error as the statute provides that only class A misdemeanors "defined in this chapter” — meaning the New York Penal Law— act as a per se bar to such consideration.2
The "unduly harsh” exception of Penal Law § 70.02 (2) (c) (i) authorizes the court to "impose any other sentence authorized by law upon a person who has not been previously convicted in the five years immediately preceding the commission of the offense for a class A misdemeanor defined in this chapter, if the court having regard to the nature and circumstances of the crime and to the history and character of the defendant, is of the opinion that such sentence would be unduly harsh.”
*287The People argue that the words "in this chapter” must be read more broadly, to include offenses defined in the Penal Law of any jurisdiction. That argument must be rejected.
For sentencing purposes, classification of misdemeanors depends on whether the offense is defined in the New York Penal Law ("in this chapter”) or by a statute other than the New York Penal Law ("outside this chapter”) (see, Penal Law § 55.10 [2]). We conclude that the Legislature had this dichotomy in mind when it specified the words "in this chapter” in Penal Law § 70.02 (2) (c) (i).
The authorization in Penal Law § 70.06 to consider foreign convictions further supports our reading of section 70.02. "Predicate felony conviction” is defined to include conviction "in this state of a felony, or in any other jurisdiction of an offense for which a sentence to a term of imprisonment in excess of one year or a sentence of death was authorized and is authorized in this state” (Penal Law § 70.06 [1] [b] [i]; see also, Penal Law § 70.10 ["Sentence of imprisonment for persistent felony offender”]). Penal Law § 70.02 has no comparable authorization or procedural safeguard afforded defendants charged with having committed felonies in other jurisdictions (see, CPL 400.21, 220.35; see also, People v Gonzalez, 61 NY2d 586, 589). As defendant points out, the Legislature was explicit when it intended that crimes committed in other jurisdictions affect New York sentences.
That legislative intent, additionally, is evident from a repealed Criminal Procedure Law provision, which did contemplate consideration of "equivalent” foreign misdemeanor convictions by a New York sentencing court. CPL former 400.14, enacted in 1984 as part of a legislative attempt to change the sentencing structure for certain class A misdemeanors so as to avoid mandatory jury trials, provided the procedural mechanism for determining whether a defendant was a "second crime offender.”
Under that statute, a "predicate crime conviction” had to have been "in this state * * * a misdemeanor defined in the penal law or a felony or in any other jurisdiction * * * an offense for which a sentence to a term of imprisonment in excess of fifteen days or a sentence of death was authorized in that jurisdiction, provided that such offense, if committed in this state, would have been at the time of its actual commission, a misdemeanor defined in the penal law or a felony” (CPL former 400.14 [1] [b] [i]). Other qualifying criteria and *288procedures were also put in place (see, CPL former 400.14 [1], [4]-[9]; see also, Governor’s Mem of Approval, L 1984, ch 673, 1984 McKinney’s Session Laws of NY, at 3632 [noting that CPL 400.14 "also contains various procedural safeguards to assure that such defendants’ rights are protected.”]).
Thus it is clear that the Legislature could and did implement procedures similar to that used for foreign felony convictions when it intended that analogous misdemeanor convictions affect sentencing. The absence of such a legislative mandate in the unambiguous language of Penal Law § 70.02 (2) (c) (i) is clear indication that only prior New York Penal Law misdemeanor convictions would automatically disqualify a defendant from consideration of whether the mandatory sentence would be "unduly harsh.” Of course, such misdemeanor convictions — even though not per se disqualifying for mitigation purposes — could still be considered by trial courts in assessing defendants’ "history and character” (see, Penal Law § 70.02 [2] [c] [i]).
In sum, we construe and apply the statute "as it is written by the Legislature, not as some judges may believe it should have been written.” (People v Olah, 300 NY 96, 102.) In Olah, involving the second felony offender statute, we concluded that a crime is to be limited by the statute that defines it, regardless of extraneous allegations in the indictment, leaving the Legislature free to broaden the relevant definition should it so desire (id.). We reach a similar conclusion here.
Accordingly, the order of the Appellate Division should be modified by remitting the matter to Supreme Court for resentencing in accordance with this opinion, and, as so modified, affirmed. As the Appellate Division noted, prior to resentencing defendant should be given the opportunity to withdraw his guilty pleas.
Chief Judge Wachtler and Judges Simons, Alexander, Titone, Hancock, Jr., and Bellacosa concur.
Order modified and case remitted to Supreme Court, Bronx County, for further proceedings in accordance with the opinion herein and, as so modified, affirmed.
. We thus need not and do not consider whether police misconduct may provide a basis for mitigation as a possible deficiency in proof under Penal Law § 70.02 (5) (b) (iii).
. Penal Law § 70.02 (2) (c) (i) is relevant only to the consideration of a defendant’s foreign misdemeanor convictions. Of course, any foreign felony convictions could be considered under the relevant predicate felony offender statute (see, Penal Law §§ 70.04, 70.06, 70.08, 70.10).