BOSTON — Carmelo Anthony got off to a hot start, but referee Tony Brothers felt the Knicks star needed to cool down and sent him to the showers early.

Anthony was ejected with 4:44 left in the first half after picking up two technical fouls for arguing a call with Brothers. It was a six-point game at the time, but the Knicks struggled offensively, had their usual defensive difficulties and let the Celtics run them out of TD Garden, 115-87, on Friday night.

After the game, Anthony left the locker room without talking to reporters. But others, including Anthony’s wife, LaLa, said he has a history with Brothers.

“He hates Mel,” LaLa tweeted. “It’s personal. Always has.”

A pool reporter asked Brothers if there is any history with Anthony and he said, “No.” Brothers said his reason for each technical was “bad language.”

advertisement | advertise on newsday

It was Anthony’s ninth career ejection and the first time he was whistled for two technicals since Dec. 12, 2012, against Chicago. He left with 12 points, all of them coming in the first quarter.

Courtney Lee, who was closest to Anthony when he picked up the second technical, said Anthony told Brothers he always calls technicals on him. Hoping to protect Anthony, Lee tried to convince Brothers that he had said something.

Derrick Rose was nearby and was surprised that Anthony got the second technical. “I didn’t think it was coming at all,” Rose said. “I didn’t think he deserved it. He was still talking in a low, low voice. I didn’t get it, but I guess they have a history or something and he was tired of it or something.”

The Knicks (3-5) let their frustrations got the better of them throughout the game and were called for six technical fouls. The Celtics (4-4) had a 43-17 advantage in free throws attempted.

“I can’t comment on that stuff except for some of those, I don’t blame the guys,” Jeff Hornacek said.

Joakim Noah was called for one from the bench in the third quarter and said it was “very well deserved.” Kristaps Porzingis was hit with one in the fourth for punching the ball in the air.

Brandon Jennings got one for slamming the basketball, drew his second for continuing to argue and was ejected with 3:20 left. “I was just frustrated,” he said. “We were getting blown out. I felt like we got punked.”

“We just wanted more respect,” said Porzingis, who led the Knicks with 14 points.

The Knicks shot 33-for-93 from the field (35.1 percent). They will try to bounce back with a well-rested Anthony Saturday night in Toronto.

Isaiah Thomas led the Celtics with 29 points and didn’t play the fourth quarter. Avery Bradley added 15 points and 10 assists.

advertisement | advertise on newsday

On the play that changed the game, Anthony and Amir Johnson were battling for a rebound on a free throw. Johnson outworked Anthony and Willy Hernangomez and dived on the floor to get the ball. Anthony got on the floor, too, and was whistled for the foul.

Anthony let Brothers know he didn’t agree with the call and apparently said too much. He followed Brothers, kept jawing at him and quickly was hit with a second one.

“He dove on top of him,” Brothers said. “You can’t dive on top of a player to go after a ball. That’s a foul.”

The Knicks were down 44-38 at the time. It ended up being a four-point possession as Thomas made the two technical free throws and Johnson the two free throws for the personal foul.

The Celtics extended their lead to 50-38 after two more free throws by Thomas with 3:29 left and were never really threatened after that. Noah’s basket brought the Knicks within 74-67 with 4:35 left in the third quarter, but the Celtics went on a 12-2 run to open an 86-69 lead.

advertisement | advertise on newsday

The Knicks cut it to 86-74 early in the fourth quarter but scored only two points in the next five-plus minutes and fell behind by 23.

“They outhustled us,” Hornacek said. “They got the calls. They were just more aggressive.”