
    The People of the State of New York, Respondent, v Robert B. Corwin, Appellant.
   Yesawich, Jr., J.

Appeal from a judgment of the Supreme Court (Crew, III, J.), rendered November 7, 1986 in Tioga County, convicting defendant upon his plea of guilty of the crime of criminal sale of a controlled substance in the fifth degree.

Defendant was indicted for criminal sale of a controlled substance in the third degree, a class B felony; he allegedly sold 0.75 grams of cocaine to a police informant. During his trial on that charge, defendant, on the advice of counsel, pleaded guilty to a class D felony and received a bargained-for sentence of 2 to 4 years’ incarceration. Following his plea, defendant, pursuant to CPL 400.21, challenged the validity of his prior felony conviction in Pennsylvania, claiming that he thought he was pleading guilty to a misdemeanor or had the opportunity to convert the felony to a misdemeanor by testifying on behalf of the prosecution. Supreme Court held a hearing and determined that defendant was well aware he was pleading guilty to a felony. At sentencing, defendant complained about the effectiveness of his trial counsel. He was given the opportunity to consult with a different lawyer, following which he declined to withdraw his guilty plea. The agreed-upon sentence was then imposed. Defendant appeals, relying primarily on the grounds raised at Supreme Court. We affirm.

A knowing, intelligent and voluntary guilty plea generally waives nonjurisdictional defenses (People v Taylor, 65 NY2d 1, 5), such as a claim of ineffective trial counsel (see, People v Petgen, 55 NY2d 529, 534-535). Defendant seeks to bootstrap that claim by arguing that he was "railroaded” into pleading guilty because of his attorney’s poor trial performance and, therefore, his plea was involuntary. The record reveals that the motivating factor for his plea was the strength of the People’s case, not any inadequacy on the part of defense counsel (see, People v Bonk, 83 AD2d 695). His belief that a promising defense existed is not supported by the record. That defendant’s counsel was indeed effective is apparent from the fact that although defendant faced a possible prison term of 12V2 to 25 years if convicted of the indicted charge, counsel secured a plea to a less severe felony and the minimum sentence available.

Given defendant’s acknowledgement during the Pennsylvania plea allocution that the offenses to which he was pleading guilty were all felonies, his challenge to his status as a predicate felon lacks merit. And defendant’s remaining contentions, including the assertion that the negotiated sentence was harsh and excessive, are either unpersuasive or have been waived by his guilty plea (see, e.g., People v Clavijo, 126 AD2d 907, 908; People v Normandin, 122 AD2d 348, 349-350).

Judgment affirmed. Mahoney, P. J., Kane, Casey, Weiss and Yesawich, Jr., JJ., concur.  