ROCKLAND — A Maine man authorities say was under the influence of the drug known as bath salts when he used an infant as a shield to avoid arrest has reached a deal with prosecutors under which he will spend no more than 90 days in jail.

Tony Bartlett, of Washington, entered guilty pleas in Knox County Superior Court this week to charges including assaulting an officer, resisting  and endangering the welfare of a child.

The Bangor Daily News reports that if Bartlett violates the agreement, the judge would be able to impose a more severe sentence.

The 21-year-old Bartlett was arrested in December after police responded to a domestic violence call. Police say he had his 6-month-old baby in his arms and refused to give him up, squeezing him until he cried.

Knox County Sheriff’s Office Sgt. Michael Sprague kneed Bartlett in the groin, which allowed Bartlett’s father to take the baby.

Bartlett still wouldn’t submit to arrest he was Tasered him three times and pepper-sprayed him twice, police said.