NEW GLOUCESTER — Police say a teenager from New Gloucester who broke into a home through a bedroom window Wednesday morning got a big surprise when he got inside.

The Cumberland County Sheriff’s Office says that 18-year-old Michael Farling was arrested by a detective who had been waiting inside the home on Swamp Road.

The sheriff’s office was investigating a series of daytime burglaries in the New Gloucester area, and as part of the investigation decided to stake out the home at 16 Swamp Road.

A detective took Farling into custody without incident. He was being held in the Cumberland County Jail on $50,000 cash bail Wednesday night, pending a court appearance in Portland on Friday.

Farling, who lives on Chandler Mill Road, is charged with burglary and violation of conditions of release.