ROCHESTER, N.Y. -- The man accused of attacking Republican gubernatorial candidate Lee Zeldin at a July rally in Western New York is set to be released from custody next week and admitted to an alcohol treatment program.

A federal magistrate judge ordered David Jakubonis's release for Monday under a series of conditions, including he immediately check into the inpatient alcohol treatment center at the Bath VA Medical Center. The defendant's attorney, John DeMarco, said the rehabilitation program should take roughly 28 days, then he will be at the Richards House, a Veterans Outreach Center facility in downtown Rochester.

"We’re pleased with the Federal Magistrate’s decision and given the criteria the Magistrate was required to review - it’s the right determination," DeMarco said. "As the Court concluded -Mr Jakubonis is not a flight risk and given the resources available through the Bath VA and the Monroe County Veterans Treatment Court, the risk of danger to the community is very low and manageable given the accountability and safe guards embedded in their respective programs. We now look forward to his recovery and a opportunity to defend the merits of this matter." 

In July, video recording showed Jakubonis getting on stage with Zeldin and appearing to attempt to assault the candidate with a self-defense tool. There was a brief tussle with Zeldin before several people stepped in to help apprehend him and nobody was seriously injured.

Jakubonis was at first released but has been in custody since being charged federally for an assault on a congressman, Zeldin's current position. His attorney has argued the veteran was drunk and did not know who the candidate was.

He is still facing the charges that carry a maximum penalty of 10 years in prison. Zeldin has previously expressed sympathy for Jakubonis and said he supports him in getting the help he needs. 

“When our veterans seek treatment, it’s easy to pinpoint their physical wounds, but oftentimes their invisible wounds go unnoticed and untreated. Unfortunately, it’s now clear that Mr. Jakubonis is one of the many veterans battling invisible demons, but, fortunately for Mr. Jakubonis, he is now getting the help he needs," Zeldin said in a statement. "I’m thankful for the judge who has wisely recognized this reality, the Monroe County Veterans Services Office, and other individuals who have worked diligently to assist.”

Under the terms of the release, there will be GPS bracelet and alcohol monitoring and the defendant will not be allowed to drive. The Monroe County Veterans Court will do regular checks and make weekly reports to federal court and Jakubonis could return to jail if he steps out of line.