BANGOR, Maine — A Brewer man charged with injuring his then 13-week-old daughter in May pleaded guilty Tuesday to Class D assault at the Penobscot Judicial Center.

In a plea agreement with prosecutors, James Frank, 23, was sentenced to 364 days in jail — the maximum sentence for a Class D crime — with all but 30 days suspended, according to his attorney, Jeffrey Silverstein of Bangor. Frank also was sentenced to one year of probation.

Frank originally was charged with Class B aggravated assault and Class C assault. If convicted of the more serious charge, he would have faced up to 10 years in prison and a fine of up to $20,000. A conviction on the Class C charge would have carried a maximum penalty of up to five years in prison and a fine of up to $5,000.

The child suffered a head injury consistent with a shaking episode, according to court documents. The girl also had bruising on both sides of her lower abdomen consistent with the outline of fingers, a bruise on her right shoulder and another on the left side of her chin.

Now 5 months old, the baby has completely recovered, Silverstein said Tuesday.

“James was inexperienced and inept at dealing with an infant,” the attorney said of his client. “He found himself in a very difficult position and didn’t know what to do.”

Frank initially told investigators that he was cradling the baby when he fell down the stairs in the Allen Road apartment he shared with the child’s 23-year-old mother, according to court documents. He quickly changed his story to confess to picking his daughter up by the shoulders and neck.

“Since telling police what really happened,” Silverstein said, “he has done everything right — he’s sought counseling, taken parenting classes and worked with” the Department of Health and Human Services.

Frank’s probation conditions call for him to continue counseling and working with DHHS, the attorney said. He has been allowed supervised visits with his daughter, Silverstein said.

R. Christopher Almy, district attorney for Penobscot County, said Tuesday after the sentencing that the plea agreement was appropriate in Frank’s case.

“We made this offer based on the evidence, on what we could prove and what we felt was the appropriate charge for the defendant’s actions,” he said. “And a judge approved it.”

The defendant has been free on $20,000 unsecured bail since his first appearance in court on June 1. Frank is to begin serving his sentence today at the Penobscot County Jail, according to Silverstein.