Mike D'Antoni asked to meet with officials from the Knicks and with James Dolan on Wednesday morning.

D’Antoni asked Dolan if he would be open to trading Anthony before the trade deadline, according to a person briefed on the meeting. When Dolan refused, D'Antoni offered to resign.

The decision to walk away “was absolutely Mike’s,” according to a D’Antoni associate.

“He basically said he didn’t see how he could coach them to success the way it was right now,” the person said, adding, “He didn’t want to get beat up for the next two months or see Melo get beat up for the next two months.”

The departure of D'Antoni stunned Knicks' players, a majority of whom were loyal to him and believed in his system. Many players were angry that D'Antoni may have been forced out.

“The vast majority of our team wouldn’t be in the situation we are without Mike,” said one player, who asked not to be identified because of the Garden’s charged political atmosphere. He added, “If management gets behind Mike and gives Mike a two-year extension, this doesn’t happen.”

The tension that existed between Anthony and D'Antoni, as well as with Anthony and the rest of team, has undermined the morale of the Knicks.

“He had a certain ideal of a system that we were supposed to implement,” Stoudemire said. “We all didn’t quite buy into it, and he got frustrated. And I think that’s why he took his way out.”

The Knicks promoted Mike Woodson to become the interim head coach.