Wizards guard Bradley Beal finished with a game-high 34 points and added nine assists and seven rebounds in Washington’s road win over the Celtics. (Charles Krupa/Associated Press)

The Washington Wizards walked away, and all they could do was hold their hands on their heads or clutch their knees.

They lacked the energy to properly acknowledge their 125-124, double-overtime win against the Boston Celtics on Wednesday. Three starters played more than 40 minutes — on the second night of a back-to-back set, no less. They needed a staggering effort just to remain on the TD Garden parquet floor against a Celtics team missing six key players.

Though the Wizards exhausted themselves in a win that lacked style, the night showed both of their sides — an exasperating team that trailed by 20 points in the first half and the exciting version that turned a night doomed for humiliation into a season highlight.

“It was a roller-coaster ride,” Coach Scott Brooks said.

“It was a test of who we were as a team,” Bradley Beal added.

“It’s just good to come out with a win in these types of games where you feel like you kind of stole one,” Jodie Meeks summarized.

Even if the Wizards (39-30) felt like thieves in the Garden, they made the plays to snap a two-game losing streak.

In double overtime, moments after a weary Markieff Morris missed two free throws, he was given another chance. He waited beyond the arc for a shot with an even greater level of difficulty, especially in the final three minutes.

This time, Morris delivered. After his three-pointer ripped the net, he turned and pumped his fist toward the Wizards’ bench. The shot provided a 122-117 cushion, and Washington needed every point as Boston pulled within one in the closing seconds.

But when rookie Jayson Tatum’s three missed the mark, the Wizards finally could breathe. Or at least try to catch their breath.

“Everybody was tired,” said Beal, who played 47 minutes. “You could see I was dog tired. Otto [Porter Jr.] was tired. Everybody was tired, but this is an unbelievable feeling when that clock cans [and] you’re the ones on top.”

Beal scored 16 of his game-best 34 points in the third quarter. Porter, who carried the team in the first overtime, finished with 18, and Morris scored 20 points in 43 minutes.

“We could have easily folded or gone in the opposite direction,” Beal said. “I’m proud of my teammates. We did a good job of staying poised, balanced and battling this one out.”

The conflict for the Wizards started early. Maybe as early as Wednesday afternoon when the Celtics released the list of injured players who would be sidelined for this nationally televised showcase.

The Wizards knew they would not have to contend with all-stars Kyrie Irving and Al Horford. But Coach Brad Stevens’s healthy players still operated within their winning system, and Washington’s lack of execution against the Celtics’ substitutes resulted in a deep deficit.

Washington may not have had to stop Irving, but it seemed to forget about the smooth Tatum (19 points). As the Celtics opened an early 9-2 run, Tatum split a sloppy double-team by Tomas Satoransky and Marcin Gortat, then threw down a dunk. Moments later, Tatum dribbled into the heart of the Wizards’ defense as if he were skipping through the pregame layup line.

Washington may not have had to defend Horford, but it failed to account for Marcus Morris’s range. The 6-foot-9 Morris, who started at small forward, showed a feathery touch in hitting three looks from the deep. Morris, who makes only 1.5 threes per game, fueled the Celtics’ three-point attack as the team made 6 of 7 (85.7 percent) in the first half.

The Celtics also did not have the services of Jaylen Brown, Marcus Smart or Gordon Hayward, who has missed every game after his gruesome left ankle injury in the season opener. Yet the roster deficit did not matter, and Boston spent the first half working over the Wizards.

The Celtics controlled the glass for a 25-15 advantage, which included nine offensive rebounds that led to 14 second-chance points.

Last year’s NBA Development League player of the year, Abdel Nader, matched Beal, the Wizards’ all-star guard, with five first-half points.

But after Beal’s big third quarter and improvement all around by the Wizards in the fourth quarter, Meeks restored order.

With 2.4 seconds remaining in regulation, Porter passed up an open layup to find Meeks in the corner in front of the Boston bench. His game-tying three-pointer sent the game into its first overtime and sparked a dramatic conclusion with back-and-forth swings.

“Man, on one end it seemed we had the game in control. Then they went on a little five-point run,” Meeks said, “and vice versa.”

Ultimately, the game favored Washington, whose players slowly walked off the court fatigued but satisfied.

“It was just one of those celebrate-inside type feelings while your body is gasping for air,” Beal said.