The man who allegedly beat former “Real Housewives of New Jersey” star Dina Manzo during a home invasion in 2017 has formally been charged.

James Mainello, 51, was indicted by a grand jury on charges of first-degree robbery, second-degree burglary, second-degree aggravated assault, third-degree aggravated assault, third-degree theft, third-degree possession of a weapon for an unlawful purpose and third-degree criminal restraint, per a Monmouth County Prosecutor’s Office press release Monday.

Mainello was arrested in May and was denied bail. He faces up to 20 years behind bars if he is convicted of a first-degree crime and five to 10 years if he is convicted of a second-degree crime. The third-degree charges carry terms of three to five years behind bars, per the release.

“My client maintains his innocence and looks forward to his day in court,” Mainello’s lawyer, Marco A. Laracca, told Page Six. “He is not guilty and will be seen as such when facts come to light.”

Manzo, 47, and her then-boyfriend David Cantin, 39, told Holmdel police at the time that they were confronted by two men who were already inside their home. One man struck Cantin several times with a baseball bat while Manzo was punched multiple times by the other man. They were then bound together while the thieves made off with cash and jewelry. Cantin, a father of two, eventually was able to free himself and call 911. They were taken to a local hospital and received treatment for their facial injuries.

Manzo and Cantin were living in California at the time but were visiting their home state for her goddaughter Audriana Giudice’s christening.

The mom of one confirmed in May that she secretly tied the knot with Cantin on June 28, 2017 — just over a month after the invasion and attack.

Manzo’s lawyer declined to comment.