Washington’s John Wall gets a shot off over the outstretched arm of Houston’s James Harden during Saturday night’s Wizards win at Toyota Center. (Troy Taormina/USA Today Sports)

Washington Wizards Coach Randy Wittman woke up Saturday morning to news that rendered his recent troubles trivial. His older brother, Rick, died unexpectedly early Saturday morning in Indianapolis. Wittman didn’t attend Washington’s shootaround at Toyota Center, but his status for Saturday night’s meeting with the Houston Rockets didn’t waver. As he did a few months ago, when Flip Saunders, one of his best friends, died of cancer in late October, he was going to coach despite the heartache.

So Wittman coached. He patrolled the sidelined as he always does, barking at referees and players. And by the end of the night the Wizards had earned a pivotal victory, capping off an emotional day with a wild 123-122 win to snap a three-game losing streak and avoid plunging to a season-worst five games under .500.

“Tough day,” Wittman said before pausing to hold back tears. “But he was here. He watches every game in a La-Z-Boy and he’s up in heaven watching it in a La-Z-Boy. Tough day, but I’m proud of our guys.”

The Wizards arrived in this Texas metropolis Friday night for the beginning of a brutal three-game stretch against the Rockets, Oklahoma City Thunder and Golden State Warriors confident that they had shed their woes in their locker room at Verizon Center, where they held a players-only meeting late Thursday night following a troubling loss to the underwhelming Denver Nuggets. Accountability was the chief topic of discussion, players later explained, and they emerged assured that they would figure out a way to perform better starting Saturday.

While their defense remained suspect — the 122 points were the third-most they’ve surrendered in a game this season — the Wizards got a defensive stop when they needed it most. With eight seconds remaining, the Rockets went to James Harden, who tormented the Wizards again with a game-high 40 points, but he missed a layup and Josh Smith misfired on a putback.

“It was a big win,” said Wizards forward Jared Dudley, who admitted fouling Harden on the final possession. “We wanted to win this one for coach. We’ve been struggling and this was a game we were grinding throughout.”

An egalitarian offensive effort masked Washington’s defensive warts. The Wizards (21-24) had eight players score in double figures. John Wall headed the effort with 19 points, 13 assists and eight rebounds. Otto Porter, battling through back and hip ailments, scored nine points in 12 minutes. Ramon Sessions added 17 points off the bench as Washington’s reserves outscored Houston’s group, 55-25. Washington outrebounded Houston, 45-37, shot 52.3 percent from the field, and went 8 of 17 from three-point range in the second half after starting 3-for-15.

Harden nearly posted a triple-double — he added 11 assists and seven rebounds — and Dwight Howard posted 20 points before he was ejected in the fourth quarter for the Rockets, who have lost three straight to fall to 25-25.

“It was important because we were not able to take care of home court,” Wall said.

Physicality and verbal exchanges between players, in particular Howard and Nene, peppered the contest and peaked in the fourth quarter with 8 minutes 7 seconds remaining and the Wizards leading 102-98. Nene and Howard were both ejected for engaging in a shoving match. Howard had earned a technical foul earlier in the second quarter for acting out the flagrant-1 foul Dudley committed on him and was given a second technical for engaging with Nene. Nene, who appeared to wrap his hand around Howard’s neck, was initially assessed a common foul and a technical foul but the referees changed their ruling to two technical fouls after reviewing the sequence.

“I don’t know,” Nene said when asked why he was given two technical fouls.

Harden was given a free throw for Nene’s second technical (one was offset by Howard’s technical) and made it to spark a 15-5 Rockets spurt that resulted in a 113-107 lead. The gap remained at six points with just over three minutes remaining when the Wizards employed the hack-a strategy for the first time this season. They targeted Clint Capela, who had replaced Howard, on consecutive possessions and Capela, a 57.2 percent free-throw shooter this season, missed three of four free throws. Meanwhile, Wall’s three-pointer with 2:27 on the clock knotted the game at 117.

“Coach Wittman doing that gave us an opportunity to win the game because they were scoring at will,” Dudley said. “It got them out of their flow offensively. They had to sub him out of the game. So great coaching move at the right time. Hack-a-Capela, Hack-a-whatever, he did it at the right time.”

The Wizards took a four-point lead with free throws from Dudley and Wall before Houston sliced the deficit to one and retained possession with eight seconds left after Wall missed a layup. The Rockets then put the ball in Harden’s hands and, for once, the Wizards were able to stop him.

“They fought tooth and nail for 48 minutes,” Wittman said. “And not every call went our way, but every play was executed right. They fought and flew around for 48 minutes. We came away with the win and I can’t be more proud. I’m so proud of my brother.”

Note: Randy Wittman’s older brother, Rick, died unexpectedly in Indiana early Saturday morning. The Wizards coach stayed with the team to coach in the victory, but it is not yet known whether he will coach the team Monday night against the Oklahoma City Thunder. If Wittman misses any games, Don Zierden or Don Newman would assumed coaching duties.

This has been a trying season on a personal level for Wittman, who didn’t attend the Wizards’ shoot-around at Toyota Center upon hearing the news Saturday morning.