The game was unraveling, a gigantic lead disappearing right along with their energy levels, and the Washington Wizards were in desperate need of a calming presence. It came from the youngest player on the roster. With all of the madness going on around him, Bradley Beal remained unshaken as he helped the Wizards avoid what would’ve been one of the most disappointing losses of the season to the Milwaukee Bucks.

After the Bucks had finally chopped down a 28-point first-half to just three, Beal answered with a driving a layup and then buried a three-pointer to secure a 114-107 victory at the BMO Harris Bradley Center. Beal scored 12 of his 23 points in the fourth quarter as the Wizards (33-29) won for the eighth time in nine games.

Trevor Ariza made five three-pointers and led the Wizards with a game-high 28 points, but after dominating for the entire the first half Washington left the floor feeling relief more than anything. John Wall had a poor offensive night, scoring just nine points on 4-of-14 shooting, but he handed out 13 assists and put the game completely out of reach when he buried a three-pointer to put the Wizards up 112-101 in the final minute.

“Any time you win, it’s a good win. No matter who you playing against, no matter where you’re playing,” Ariza said. “We are fortunate to get a win. It could’ve been a little bit prettier, but even ugly ones count. However you got to get it, you got to get it.”

The Bucks (12-50) have the NBA’s worst record but they have given the Wizards fits this season, pushing them to overtime in each of the first two meetings, with both teams winning on the road. When the teams met at Verizon Center on Dec. 6, the Wizards squandered a five-point lead with 51 seconds remaining in regulation before losing.

On Saturday, they looked like a team that had no interest in a tight contest as they hit from wherever they wanted and built a seemingly insurmountable lead. But somewhere along the way, the Wizards got too comfortable and a Bucks team that has taken its share of beatings refused to go down meekly. Brandon Knight led Milwaukee with 25 points, but the Bucks rallied behind reserves Ramon Sessions and John Henson, who combined for 26 points, including 20 in the second half.

Wall grabbed his first breather with 52.7 seconds left in the first quarter and the Wizards leading by just five points. The handoff from Wall to his backup has usually been followed by a significant dropoff, but Andre Miller came in and ran the offense as if he had been with the team for two years rather than a little more than two weeks.

Miller made a fallaway shot in the lane to barely beat the shot clock near the end of the first period to give the Wizards a 36-27 lead, then fed Drew Gooden for a jumper and a driving layup himself. A wily, crafty veteran who thrives on his brain over his physical gifts, Miller ran a clinic on the Bucks with his decision-making and old-school tricks.

After finding Martell Webster cutting to the basket for an emphatic one-hand dunk over Bucks rookie Giannis Antetokounmpo that brought the Wizards players out of their seats on the bench, Miller stole an a bad pass by John Henson. But instead of simply dribbling up the floor, Miller angled in front of Henson as he started to run and fell to the ground after drawing a foul. As his teammates rushed to pick him up, Miller flashed a huge grin.

Miller would continue setting up his teammates with sweet passes, as he hit Al Harrington in the right corner for a three-pointer and Gooden in the left corner for another. He then gave the Wizards a 54-33 lead when he hit a 16-foot set shot and grabbed a seat. In Miller’s seven-minute first-half stint, the Wizards outscored the Bucks, 24-9.

Wall returned to action refreshed and unburdened about needing to make up for lost time. He made an easy, uncontested driving layup and found Beal open for two three-pointers, the last one giving the Wizards a 71-43 lead. Beal made 5 of 8 from long range in the game.

“I was just staying aggressive,” Beal said. “It was a great feeling, whenever I can step up my game. We got too complacent. We’ve got to have more of a killer mentality of just putting teams away.”