AUGUSTA — Police said a Lewiston man was arrested Thursday in Augusta on drug-trafficking charges following a monthslong investigation.

Nicholas Rolling, 22, was charged with trafficking in schedule W drugs, a Class B felony punishable by up to 10 years in prison, according to Maine Department of Public Safety spokesman Stephen McCausland.

Rolling was arrested with Loretta Barton, 57, of Augusta, who was charged with aggravated trafficking in schedule W drugs, a Class A felony, punishable by up to 30 years in prison.

Authorities said the two were selling cocaine, crack and heroin.

According to police, an investigation by the Maine Drug Enforcement Agency in Augusta that included the Augusta Police Department and the Kennebec County Sheriff’s Department involved purchases from the two defendants by undercover agents at 53 State St., a large apartment house on the corner of State and Bridge streets.

On Thursday, agents searched the first floor of the building, where they found Barton and Rolling. Barton rented an apartment in the building, according to McCausland.