The Donald Trump fan busted for scaling Trump Tower in a bid to see the then-presidential nominee up close took a plea deal Monday in Manhattan court for the wild stunt.

Stephen Rogata, 19, copped to misdemeanor reckless endangerment and disorderly conduct for climbing 21 floors of the Fifth Avenue skyscraper last August using giant suction cups and rope.

The human fly must continue mental health treatment, stay in college and abide by an order of protection in favor of the president.

If he complies with the conditions for one year, he’ll have no record and face no jail time, prosecutors said.

“We’ve spoken to the Trump Organization, and they have indicated they are comfortable with the people’s offer,” said Assistant District Attorney Pierre Griffith.

Judge Joanne Watters warned Rogata that he was “to have no contact with Donald J. Trump” or the deal could be rescinded, and he’d face up to one year in jail.

The Virginia resident told investigators that he made the daring Aug. 10 ascent to offer the real estate tycoon crucial advice on how to tackle his job as leader of the free world.

“My intention was to get a meeting with Mr. Trump to give him secret information,” he allegedly said.

The three-hour spectacle, which attracted hundreds of onlookers in the street below, ended when cops yanked the daredevil off the glass facade and dragged him inside the building.

Several items fell from his backpack during the climb, including a laptop, officials said.

Defense lawyer Paul Shechtman was satisfied with the resolution. “We’re very pleased that the district attorney handled the case in the way it did, and that it understood the mental health issues that underlie the case,” he said.