Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

ANCHORAGE, Alaska — The oldest son of former Alaska Gov. Sarah Palin will spend a year in custody after a judge ruled Wednesday that allegations of hitting a woman on the head disqualified him from a therapeutic program for veterans stemming from a separate assault case.

Track Palin, 29, has been accused of three attacks on people close to him over the past few years, the most recent coming last week. Palin, an Army veteran who served one year in Iraq, entered a program intended to rehabilitate veterans after he was arrested in an assault on his father less than a year ago.

Anchorage District Court Judge David Wallace told Track Palin that he violated conditions of a plea agreement in the earlier case and must report to a halfway house at month's end.

The Department of Corrections will determine if he serves time at the halfway house or behind bars. Anchorage District Attorney Richard Allen said jail time is unlikely.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The judge could have chosen to let Palin remain in Alaska Veterans Court, which gives eligible former service members the option of enrolling in mental health treatment instead of a traditional sentence.

Palin was arrested Friday night after a female acquaintance said he told her that she could not leave his house in Wasilla, took away her phone and then hit her in the head, according to court documents.

The woman said the pair wrestled over the phone and that Palin let her leave after she screamed for help, according to an affidavit by Alaska State Troopers. They said Palin told them that the two were arguing over how they said goodbye and that any injuries the woman had she did to herself.

Authorities say he also kicked over a table and threw his head back at a trooper as he was arrested. Palin is in jail facing misdemeanor charges including assault, resisting arrest and disorderly conduct.

Last December, Palin was accused of breaking into his parents' home and leaving his father, Todd Palin, bleeding from cuts on his head, authorities have said. He pleaded guilty to a lesser charge in veterans court.

Track Palin's arrangement called for him to serve 10 days in jail if he completed the therapeutic program and a year behind bars if he didn't.

Palin also was accused of punching his then-girlfriend in 2016, court documents said. He pleaded guilty to possessing a firearm while intoxicated, and the other charges were dismissed.

Sarah Palin indicated that post-traumatic stress disorder might have been a factor in that case.