Barenaked Ladies frontman Steven Page has reached a deal with U.S. prosecutors and will avoid jail time on drug possession charges, but must stay clean for the next six months.

U.S. judge Thomas Miller announced the deal in a Fayetteville, N.Y., courtroom Tuesday.

Page, clean-shaven and wearing a shirt and tie underneath his sweater, said he would work hard to prove himself as a law-abiding citizen.

"The respect and responsibility I have earned over the course of my life and my career thus far are important to me and I am moving forward from this with gratitude and with hope," Page said in a prepared statement.

"I also apologize to all of those I have hurt or embarrassed during this episode."

CTV's John Vennavally-Rao said prosecutors reduced the charges against Page from a felony to a misdemeanour. If Page seeks treatment and is able to stay clean, the charges could be dismissed.

Page, 38, faced drug possession charges along with his girlfriend, 27-year-old Christine Benedicto, and her roommate, 25-year-old Stephanie Ford. The two women were given the same deal.

"Based on each defendant's exemplary behaviour and positive attitude from the beginning, I fully expect in six months time this will be over, with each of the defendants ultimately benefitting from this painful experience," Page's lawyer, Mark Mahoney, said in a statement.

"Once the charges are finally dismissed, there will be no legal obstacle to Mr. Page entering the United States like any other Canadian citizen."

The trio was charged in July after police found cocaine in the women's apartment in Fayetteville, which is about 15 kilometres east of Syracuse, N.Y.

Police said they became suspicious when they saw a vehicle parked in front of the apartment with its driver-side door open.

When officers knocked on the door, Page and Ford invited the officers in, police say.

Court documents show Ford admitted to police that she and Page had snorted what she believed was cocaine, using a rolled up Canadian bill.

Documents also cite Page as telling the police, "Yeah, it's cocaine."

Police say Page had about a third of an ounce of cocaine in the apartment, along with some marijuana.

The Juno-award winning band's fame first came with their hit "If I Had a Million Dollars."

Their most recent project was a children's album titled "Snack Time."

Page is a father of three.

With files from the Canadian Press