The rocky marriage between Phil Jackson and the Knicks is over.

Both parties agreed to part ways, ending Jackson’s tenure as team president a little more than three years into a five-year, $60 million contract, the team announced Wednesday.

The timing of Jackson’s exit — six days after the draft, three before the start of free agency and two months after he and owner James Dolan reportedly picked up their option on the last two years on the deal — couldn’t be much worse. The former 11-time NBA champion coach and two-time champ while playing for the Knicks in the 1970s was in charge of the entire direction of the team since March 2014. His exit leaves a hole atop the chain of command.

Even the most level-headed Knicks fans would have a hard time calling Jackson’s first foray as an NBA executive a success, given an 80-166 regular-season record and zero playoff appearances in his three full campaigns. But, like anything, it wasn’t all bad.

Read on for a look as the good, bad and ugly of Jackson’s time running the show for the Knicks.

Good: The draft

Jackson’s decisions during the 2015 draft will always be the pinnacle of his tenure. After missing out on a top-three selection, he made the unpopular choice of Latvian forward Kristaps Porzingis at No. 4 and watched the kid blossom into a budding star within months. His second-round, under-the-radar acquisition of Spanish center Willy Hernangomez appears to be paying off as well.

Previous leadership left the Knicks at a draft-pick deficit for years, something Jackson refused to repeat. And last week’s No. 8 pick Frank Ntilikina could still be a great pick, but it’s way too early to tell.

Bad: Round pegs, triangle holes

Re-signing Carmelo Anthony in 2014, the first major decision of Jackson’s time in New York, signaled a win-now mentality. Signing veterans such as Robin Lopez (2015) and Joakim Noah (2016), plus trading for Derrick Rose (2016) echoed that.

But the team wasn’t at all competitive, in large part due to these players poor fit in the triangle offense. Jackson won 11 NBA titles coaching teams that ran the system, but these players didn’t take to it well. Rather than utilize an offense that fit franchise player Melo, Jackson forced coaches Derek Fisher, Kurt Rambis and Jeff Hornacek to run the triangle.

And while Jackson’s tenure won’t be known for deft free-agent signings, none looks worse today than the four-year, $72 million contract given to Noah. Already showing signs of decline in Chicago, Noah’s once-elite defense has eroded. He was never a gifted offensive player, so what remains is a skilled rebounder who can’t do much else and will make between $17.8 million and $19.3 million the next three seasons. He’s practically untradeable until 2019.

Ugly: Alienating stars

What stands out most from Jackson’s reign is, and likely always will be, his public criticism of Melo.

When he led the Lakers to five titles, Phil used the cachet ofpreviously winning six more with the Bulls and sought to motivate Kobe Bryant through the media. It seemed to work in Los Angeles, but in the Big Apple it did little more than alienate the head honcho from his biggest star.

Jackson engaged in efforts to ship out the franchise cornerstone, a player whom the team president himself provided with a full no-trade clause. It didn’t go well, given Melo preferred to stay in the city and his astronomical contract limited Jackson’s options.

The final straw came just two days after completing a 31-51 season in April, when Jackson said Melo “would be better off somewhere else” chasing championship that led to backlash from the players union.

The relationship with Porzingis deteriorated, as well. Jackson was critical of his young star, who opted to skip his exit meeting and reportedly has used his agent and brother Janis as an intermediary this offseason.

Before the draft, Jackson admitted he was “listening” to trade propositions for Porzingis. Although nothing came to fruition and reports indicate Jackson sought a king’s ransom in return, burned bridges with the team’s two best players appeared to be the death knell on the Zen Master’s rule.