ROCKLAND, Maine — A Massachusetts man is being held at the Knox County Jail after Rockland police said they caught the suspect inside a restaurant early Monday morning.

Police said they then linked him to a break-in at a second restaurant Sunday night.

John Cella, 49, of Charlestown, Massachusetts, was arrested Monday morning and charged with burglary, theft, refusing to submit to arrest, disorderly conduct and two counts of criminal mischief.

Deputy Police Chief Wally Tower said Officers Alex Gaylor and Andrew Redden responded to a burglary alarm at the Waterworks Restaurant and Lounge in Rockland shortly after 2:30 a.m. Monday. The officers reported that when they arrived they found an open window, looked inside and saw someone trying to open a cash register.

The officers went through the window and apprehended Cella, Tower said. He resisted arrest but was subdued.The cash register and other items in the restaurant were damaged, Tower said.

Cella was taken to Pen Bay Medical Center in Rockport after he repeatedly slammed his head into the cage that separates the back of the cruiser from the front, Tower said.

Afterward, Cella was taken to the Knox County Jail in Rockland. He made an initial court appearance on that charge Monday afternoon in Rockland District Court when it was revealed that he also was suspected of breaking into and stealing the cash register from the Roselyn Seafood Restaurant on Route 1 Sunday night.

Cella also was charged with burglary and theft in connection with that incident and will make his initial appearance on that charge on Wednesday, Tower said.

In court Monday, Judge Susan Sparaco set bail at $10,000 cash. Cella was returned to jail, where he remained unable to meet bail.