LOCKPORT – Jonathan D. Bersani accepted a plea deal in Niagara County Court Friday, admitting to two cocaine felonies while avoiding prosecution on a third.

Bersani, 21, of Koons Avenue, Buffalo, a former Town of Niagara resident, accepted a sentencing cap of three years from County Judge Sara Sheldon Farkas, who will make it official Oct. 18. Bersani is jailed in lieu of $11,000 bail in the meantime.

Bersani pleaded guilty to a reduced charge of attempted third-degree criminal sale of a controlled substance for a Nov. 15 cocaine sale to a Niagara Falls police informant. It was one of three drug deals for which he was indicted in March.

He also pleaded guilty to fourth-degree criminal possession of a controlled substance for having .127 ounces of crack cocaine April 15 in the Falls. Police said they saw him selling the drug at 10th Street and Niagara Avenue.

The plea deal enabled Bersani to avoid prosecution for a crack possession arrest that occurred June 6.

Bersani was shot May 10 by Cornelius W. Redden III, 18, of the Falls, who pleaded guilty Aug. 2 and is awaiting sentencing.