A man who scaled the side of Trump Tower has struck a plea deal in connection with the case. 

Stephen Rogata pleaded guilty to reckless endangerment and disorderly conduct charges.

Sources tell NY1 that under the deal, Rogata must continue mental health treatment and go to school or work, with no arrests for one year. He is also barred from trying to contact President Donald Trump.

Sources say if he follows those terms, he will be sentenced to a conditional discharge with no jail time.

The 19-year old Virginia native climbed up the 58-story building for hours on August 10. 

He made it to the 21st floor before police grabbed him and pulled him through a window.  

Trump was not in the building at the time.