BOSTON -- On Tuesday night, the Boston Celtics got embarrassed. The Washington Wizards showed up to a January meeting wearing all black, dubbed the meeting a "funeral," and punked the Celtics in what amounted to the NBA's version of a WWE casket match.

Boston got beaten so thoroughly that Marcus Smart, one of the most passionate players on the Celtics' roster, got into a shouting match with some of Boston's assistant coaches after trying to check himself back into the game without permission, then punched a hole in a wall in the visitor's locker room after being dismissed before the final buzzer.

The Celtics limped home to Boston for a Wednesday night visit from the rested Houston Rockets, a team that owns the second-best offensive rating in the NBA this season. Boston, losers of three straight, seemed primed for another shellacking, especially considering the Celtics owned the league's worst defensive rating since Christmas and had completely lost the defensive identity it established last season.

Al Horford, who had been struggling offensively, played maybe his finest game with the Celtics on Wednesday, putting up 20 points and nine assists. EPA/CJ Gunther

In the early hours of Wednesday morning, Celtics guard Isaiah Thomas texted Smart a few words of encouragement: "Keep your head up, man. People make mistakes. We're all human. We need you to be Marcus Smart."

It was essentially advice the entire Celtics roster needed to hear. So despite having every reason to get rolled on their home turf by an offensive juggernaut, the Celtics responded with one of their gutsiest efforts of the season.

Al Horford played maybe his finest game in green, putting up 20 points and nine assists, and Thomas worked his typical magic by scoring 13 of his game-high 38 points in the fourth quarter as the Celtics ran away with a 120-109 triumph at TD Garden.

For a Celtics team that entered Wednesday's game 0-6 against the league's top four teams (Golden State, San Antonio, Cleveland, Houston), this was about as defining a victory as it has had this season.

Thomas was asked if it was Boston's best win of the season. "Yeah, you could say that," he said.

Thomas, who will almost certainly be named an All-Star reserve Thursday, topped 30 points for the 15th time this season. Entering this season, he had reached that mark only 19 times in his career.

"Three-game losing streak, a really good team in Houston coming in here with a really good player like James Harden. You could say that was the biggest win," Thomas said. "Hopefully it gives us more confidence, and we can find a rhythm and keep playing this way."

Harden has been putting up MVP-caliber numbers, but the Celtics made him look about as mortal as possible. Harden finished with 30 points but connected on only 6 of 18 shots. He had 12 assists but seven turnovers. Harden was a minus-14 in plus/minus over his 37 minutes of floor time.

Boston's broken defense showed glimpses of its old self, all with Horford fighting through what he said was groin pain to anchor the back line. The Celtics so desperately needed a reminder of what they can be.

"We know we laid an egg [Tuesday] night," Jae Crowder said. "Immediately, when we got to the locker room [after Tuesday's game], we said, 'We’ve got another one [Wednesday] we have to have.' It felt like it was do or die. So [Tuesday] night really fueled a lot of energy and a lot of fight [Wednesday]."

Wednesday's game could have easily gotten away in the first half. Whistles were going against the Celtics, and Boston got tagged with three technical fouls for complaining, including a rare one for coach Brad Stevens.

But the Celtics composed themselves at halftime and played a brilliant second half, rallying back from a deficit of as much as 11 points.

Boston now sits just a half-game behind the Toronto Raptors, who dropped their fifth straight Wednesday, for the No. 2 spot in the Eastern Conference. The Celtics are also just 3.5 games back of a Cavaliers team that has lost three straight.

Horford and his max contract had been under the microscope a bit, given some recent struggles. Thomas suggested that Horford might have been down on himself for his shooting woes in recent games. But Horford bounced back with a brilliant display in which he balanced finding shots for himself in the post with feeding cutters when double teams came his way.

"It was beautiful. We need that from him," Thomas said. "He knows that. I think he's been down on himself the last few games. But, as a team, we haven't played well, either. We know what Al is capable of and he did a hell of a job tonight. He was the anchor for us tonight on both ends."

WEDNESDAY SPOTLIGHT The Cavs have dropped six of their past eight. What's wrong with the champs? • LeBron gives Cavs wake-up call

• Stats: Why Cavs are struggling of late

• D-Wade, Butler question teammates

• Durant steps up in Steph's homecoming

• Celtics rise up from D.C. desolation

• Trail Blazers honor 1977 title team BOSTON CELTICS Check out the team site for more game coverage HOUSTON ROCKETS Check out the team site for more game coverage

Smart got shuffled to a bench role Wednesday. Stevens suggested it wasn't punishment for Tuesday's outburst, and Smart said Boston's coach explained he simply wanted to go with a bigger body on Harden at the start of the game. So rookie Jaylen Brown got the start.

Still, Smart responded with a typical Marcus Smart effort. The numbers won't leap off the page -- 7 points, 6 assists, 4 rebounds, 3 steals, 3 turnovers, plus-12 -- but Smart brought his familiar intensity and channeled it in a positive way on this night.

"[Tuesday's loss] set a fire under us. It kind of got everybody riled up and ready to play today," Smart said. "That's what we need. We talked about our problem with defense. We were lacking emotion playing with it, but we had that emotion tonight.

"I'm an emotional player. I give my all every night. I went about it the wrong way, let my emotions get the best of me. My coaches and teammates know the kind of person I am, what I mean, and I mean good things. It's in the past, we're moving on, but it helped us tonight."

Smart reluctantly admitted he was responsible for a hole discovered in the visitor's locker room in Washington after Tuesday's game. "I don't remember doing it but, if there's a hole in the wall, I guess I put it there. I'll take that one," Smart said. Stevens said Smart will pay to repair it.

At least for one night, something good came out of Smart's blow-up. Boston started the process of repairing itself. The Celtics seemed to hit a low point in Washington and needed to respond. The Wizards' shellacking forced Boston to own up to the fact that it had lost its identity, and Wednesday was an opportunity to start trying to get it back.

"I think tonight we just played like we're capable of playing on both ends of the floor," Thomas said. "I think the next step with this team, we just have to be more consistent at doing that and building that identity. We knew what our identity was last year, but it kind of has gone down this year. But we have to get that back to be a successful ballclub."