BANGOR, Maine — Bruises that started at one ear of a 17-month-old local boy and stretched all the way around the back of his head to the other ear are the basis for a felony assault charge leveled against the boyfriend of the child’s mother, court documents state.

Matthew McMahan, 21, of Bangor was arrested Monday after a police investigation that started March 16, the day after the child’s mother returned from work, noticed the bruising and took him to Eastern Maine Medical Center.

A judge set bail for McMahan at $2,500 during a hearing Wednesday at the Penobscot Judicial Center. McMahan remained at Penobscot County Jail late Wednesday afternoon, a jail official said.

Bangor police Detective Larry Morrill wrote in his 21-page probable cause affidavit that Dr. Lawrence Ricci, a Portland doctor the Maine Department of Health and Human Services consults in child abuse and neglect cases, “diagnosed the injury as being subgaleal hemorrhage. This injury was described to me as being when the scalp becomes separated from the skull.”

McMahan initially said he fell on a set of steps while carrying the boy, but later admitted to Morrill that he “threw him onto his bed,” the affidavit states.

McMahan told Morrill that he “did it once” sometime between 11 p.m. March 15 and 4 a.m. March 16. The grabbing of the boy apparently was violent enough to injure the child, causing “bleeding between the scalp and the skull,” the detective’s report states.

“He said that he doesn’t remember pulling [the toddler’s] hair, but he did say that he has grabbed him by the T-shirt around the neck area to stop him from jumping off the bed,” the affidavit states.

Dennis Hamrick, the attorney of the day, told District Court Judge Greg Campbell that in his opinion, the crime should be downgraded. He said it “would probably fall into the reckless [conduct] category.”

Campbell said the affidavit presented by Morrill “does contain probable cause” just before he set McMahan’s bail. If released from Penobscot County Jail, McMahan is barred from contacting the child and the child’s mother and cannot go to their Griffin Road residence or the mother’s place of employment.

“I’m not going to have you enter a plea because this is a felony charge and hasn’t been presented to the grand jury,” the judge said.

The Penobscot County grand jury is scheduled to rise later this month. The charge reaches the felony level because the child assaulted was younger than 6.

McMahan and the mother have known each other for more than a year and had been dating for 4 months. They lived together, and he was the child’s primary caregiver when she worked, the court documents state.

Nine people, including McMahan’s former guardian from Bangor, were in the courtroom to support him.