ORLANDO, Fla. — The Knicks became bystanders to a soap opera surreal even for them when Thursday night’s game against the Magic was upstaged after Orlando coach Stan Van Gundy said team star Dwight Howard has told management he wants him fired.

Asked how he knows, Van Gundy said, “I was told it was true by people here, in management, right from the top.’’

Van Gundy was responding to an Orlando television report from Wednesday which said Howard had asked the Magic front office to let Van Gundy go. Howard denied it Wednesday on ESPN.

But Van Gundy’s confirmation Thursday blindsided Howard, creating one of the more awkward moments in NBA history. The Magic cancelled Van Gundy’s availability before the Knicks’ 96-80 win last night, but he coached the team.

After the game, Van Gundy said he met Thursday afternoon with Howard, and general manager Otis Smith. Van Gundy said they have decided to move past the controversy. That was a far cry from yesterday morning.

“Management hasn’t told me anything,” Van Gundy said then. “I’m the coach until they decide I’m not the coach.”

As Van Gundy was confirming Howard wanted him fired, Howard walked into the gym and toward the coach in the middle of the media scrum. Howard put his arm around the coach — unaware of what Van Gundy had just said. It made for a painfully uncomfortable few moments.

“Stan, we’re not worried about that, right?” Howard asked.

“That’s what I just said,” Van Gundy responded. “We’ve got to be worried about winning games.”

Van Gundy then excused himself, saying it was the media’s turn to talk to Howard. Reporters repeatedly had to explain to Howard where the information was coming from as Howard kept asking, “Who is the source?’’ Howard couldn’t comprehend Van Gundy had outed him.

Howard, who played Thursday night despite a bad back and finished with eight points and eight rebounds, denied again he requested Van Gundy be fired.

“You know what I said [Thursday] on ESPN? I didn’t [say anything],” he said. “The only thing we are concerned about is winning a championship. I haven’t said anything to anybody about anything.”“I don’t think they’re worried because I don’t take anyone with me,” he said. “No one has to go anywhere if I get fired. I don’t think it’s a big distraction to the players. My staff is way beyond worrying about that stuff. My staff is worried about if we’re going to do a better job slowing down Carmelo Anthony. We’re a worried staff but not about that.

The Knicks went through nuttiness with Carmelo Anthony and former coach Mike D’Antoni, but nothing this bizarre. The Post reported on March 14 Anthony told a confidant he wanted to be traded unless he received assurances D’Antoni wouldn’t return next season, according to a source. Anthony denied the Post report, but hours later, D’Antoni resigned.

Van Gundy had said the Magic have to keep their focus on basketball and not Howard’s request.

“No one has to worry about my job security,” Van Gundy said. “There should be no concern about that and there should be no concern about what Dwight wants. That’s not what it’s about. It’s about all of us working our [butts] off and getting better as a team. That’s what it’s about. The rest of it is up to management. I wish [it didn’t happen] but I also wish it wasn’t raining.’’

Van Gundy was asked if his players are worried he’s going to get fired.

“When you take a coaching job, I don’t think any coach in this league says, ‘You know I’m going to be here until the day I die.’ [Getting fired is] going to happen at some point.’’

Howard was the subject of trade rumors across the season, specifically to the Nets, but opted into the final year of his Magic contract hours before the NBA trade deadline. There were reports Magic brass gave Howard an opportunity to choose the fate of Van Gundy and Smith, but the center strongly denied those rumors too.