CLAYTON, Ind. — A man charged with crawling through his ex-girlfriend’s window and attacking a man who was sleeping in her bed with a hatchet pleaded guilty to battery on Monday.

Robert Abney was originally charged with attempted murder, criminal confinement, battery by means of a deadly weapon and residential entry break and enter. From the plea deal, all charges were dropped except the battery, Level 5 Felony count.

According to court documents, Hendricks County Sheriff’s deputies were called to a Clayton home on Feb. 18 after a frantic 911 call from a woman there.

“Please get here,” she reportedly said. “My ex just kicked in my window and hit somebody in the head with a hatchet.”

The woman had told dispatchers she was hiding in her closet while on the call.

Deputies had arrived on the scene about five minutes after the call to see Abney in the driveway with another man bleeding from his head. The injured man told police that Abney was going to “kill me.”

The woman and man told police that Abney had broken into the house while they were sleeping, crawled through the window like a “spider monkey,” and attacked the sleeping man with a hatchet.

The woman said she awoke to Abney knocking on the window, shouting her name. The injured man added after the attack that Abney forced him to get in the car with him or he’d “kill him.”

Abney also reportedly threw the hatchet into the car once deputies approached the home.

Abney allegedly admitted to climbing into the window after seeing a man “laying there naked with my girl.” Abney claimed to live at the home, but the woman told police he didn’t but did stay there from time to time.

Court documents also stated Abney denied hitting the man with a hatchet initially but said that the two “got into it” and didn’t know why his head was bleeding. Abney reportedly later admitted to using the hatchet in a phone call with his father.

On Monday, Abney was sentenced to just over three years (1,184 days) at the Hendricks County Work Release Center after he pleaded guilty to battery. Abney is eligible for home detention after 365 days.