BANGOR, Maine — A local man who recently sold Ritalin to someone working with the Maine Drug Enforcement Agency was charged with a felony because the drug deal took place near a school, MDEA Division Commander Darrell Crandall said Monday.

“We were able to buy some of the tablets from him and that transaction occurred in a school zone,” he said.

Robert Kerr, 40, of Bangor was charged last week with aggravated drug trafficking, a charge that could send him to prison for up to 30 years and carries a fine of up to $50,000. He was booked into the Penobscot County Jail at 5:45 p.m. Jan. 24 and remained in jail on Monday night, a jail official said.

The drug deal occurred within 1,000 feet of Abraham Lincoln School, which is on Forest Avenue, according to Brad Johnston, MDEA supervisory special agent for the Bangor area.

Ritalin is used to treat attention deficit disorder but is often diverted and used as a stimulant, Crandall said.

“It is a substance that mirrors the effects of amphetamines or methamphetamines,” he said.

Kerr was convicted of theft by unauthorized taking or transfer and for domestic violence assault in May and has previous convictions for operating a motor vehicle with a suspended license and operating without a license, according to Bangor Daily News archives.