AUGUSTA — A Waterville man was sentenced to four years in prison after pleading guilty to an aggravated assault charge in which he hit a woman with a metal baseball bat.

Tyheen Shakee Walker, 33, was ordered to serve an initial five months of that sentence, with the remainder suspended while he spends three years on probation.

At Thursday’s hearing at the Capital Judicial Center, a charge of terrorizing was dismissed in exchange for the plea.

The attack occurred Aug. 9 in Waterville when the woman stepped in between Walker and her boyfriend.

The victim told police she didn’t think Walker, a neighbor, would hurt a woman.

According to an affidavit by Waterville police Officer Tristan Russell, Walker and his girlfriend went to the home of Jamie Gray to look for his girlfriend’s 11-year-old daughter. The girl had been there but left. Gray then told her boyfriend, who was outside, that the girl was missing.

The affidavit said Walker became upset with Gray “for yelling his business through the apartment complex and threatened to assault her.”

Gray and her boyfriend went to talk to Walker and his girlfriend, according to the affidavit, and Walker “had a silver, blue and black baseball bat in his hands.”

The affidavit says Walker swung the bat three times, hitting Gray in the left side and lower back before her boyfriend pulled her back into the apartment.

Conditions of probation prohibit Walker from having contact with Gray.