Bethenny Frankel's ex-husband Jason Hoppy accepted a plea deal Monday in his stalking and harassment case with "The Real Housewives of New York City" star.

Charges against Hoppy will be dismissed if he follows Frankel's order of protection for six months where he must stay away from his ex-wife and not communicate with her, E! News reported.

Hoppy was first arrested in January for stalking and harassing after Frankel said he showed up at their daughter Bryn's school and began issuing threats.

Frankel also said she was being harassed by Hoppy through email and FaceTime calls.

"It is clear from the trajectory of this case that her claims were not substantiated or credited and that their motive was questioned," Hoppy's defense lawyer Alex Spiro said outside the Manhattan court room about Frankel's accusations.

Hoppy previously rejected two other deals in the case and did not have to admit to guilt.

Frankel and Hoppy split in 2012 after two years of marriage with the divorce being finalized in July.