Derek Fisher didn’t want his players to feel good about nearly beating the Spurs, and he didn’t want anyone else to make them feel as if they had accomplished something in defeat.

Speaking passionately after the Knicks’ 100-99 loss in San Antonio on Friday night, Fisher said his message to the team was that close isn’t good enough.

“First thing was no moral victories,” Fisher said. “We had an opportunity to win the game and we didn’t. Then the second thing was not to allow to walk in there and pat them on the back for getting close as though we weren’t good enough to win the game.

“We came to win. We had a chance to win and we didn’t. But we don’t still get a gold star for getting close. This is not elementary school. This is professional sports.”

Fisher may have been a little over the top. It was an emotional night and the Knicks fought the Spurs — who now are 32-6 and have won 31 consecutive games at home — to the wire with a shot to win the game.

Jose Calderon missed a left-corner three-pointer as time expired, leaving the Knicks dejected, second-guessing their decisions and ultimately believing they’re getting closer to being a good team.

advertisement | advertise on newsday

“We’ll be OK,” Carmelo Anthony said. “I’ll take a loss like this any day.”

Anthony had the ball in the waning seconds, but with the Spurs suffocating him, he didn’t feel he could get a good look, so he passed to Calderon. His shot was on target, but a little long.

Anthony’s immediate thought after the game: “Did I make the right play? Then after seeing it multiple times after the game, I felt like I made the right play.”

Arron Afflalo, who hit two huge three-pointers down the stretch, also hit the nail on the head when he said the Knicks’ spacing on that last play wasn’t good. Three Spurs converged on Anthony on the final play because of how close three Knicks were to each other on the left side of the floor.

“Through experiences we’ll learn how to give each other space in those situations so that maybe Melo’s capable of taking those shots,” Afflalo said.

Knicks videos

The Knicks, who will host the Bucks on Sunday night, are trying to build a team that can contend and compete with the best. They showed they can do that on this three-game trip.

The Knicks (18-20) were in control in the first two games in Atlanta and Miami — two teams they’re staring up at in the Eastern Conference — and closed out those games.

They ended the trip by fighting back from 12 down with 4:25 left and had the game in the hands of one of their better shooters.

“We grew up a lot as a team this last week,” said Calderon, the most dejected player in the Knicks’ locker room. “We’re a better team.”

Head coach Derek Fisher of the New York Knicks reacts during a game against the Dallas Mavericks at Madison Square Garden on Monday, Dec. 7, 2015 in New York City. Photo Credit: Jim McIsaac

Afflalo agreed and took it a step further.

advertisement | advertise on newsday

“I think we’re getting better and learning how to compete for 48 minutes,” he said. “That was a weakness of ours in the beginning of the season, closing out games when we had big leads and when teams would make runs on us, not competing to the end, not giving ourselves a fighting chance.

“If there’s anything we can take from that, it’s our ability to compete whether we’re up or down, to build that mental stability that all great teams have.”

Said Fisher, “I think we’re getting there. These types of games teach you how much it takes, that you really do have to completely empty yourself in order to be the best. I thought we had a lot of guys that completely emptied themselves out. They couldn’t play harder. They couldn’t do more than what they tried to do. Sometimes you still come up short. We did. We’ll keep working to get better.”

advertisement | advertise on newsday