In Wednesday’s loss to the Mavericks, the Hawks followed an unfortunate pattern that has developed this season — entering the fourth quarter with a lead only to watch it diminish, resulting in a loss.

The Hawks had played a solid game and held a 91-80 lead going into the final period before Dallas, which has now won four of its past five games, surged. The game didn’t have to come down to a controversial play in the final seconds, when Trae Young thought he was fouled by Willie Cauley-Stein, but the referees deemed the contact “incidental,” and a jumper by Danilo Gallinari glanced off the rim, taking the Hawks’ chance at winning with it.

The Hawks (11-13) couldn’t get a stop, and the Mavericks couldn’t miss a shot, so another winnable game went down to the wire and ended with an L.

“I think the biggest thing for us is just staying committed to the defensive end,” Hawks coach Lloyd Pierce said after the game. “Finding a way to get a stop when we need one. We talk about our three-minute defense, our end-of-game defense, really, locking into the physicality of the game. You have to guard, you have to get a stop whether it’s your guy, or you’re in a defensive position on the weakside and you have to pull in to give help.

“... It’s that type of mentality we have to have in the fourth quarter to give ourselves a shot. We’ll be fine, executing, we just have to find one more, two more, three more plays down the stretch.”

Overall, the Hawks have improved on defense this season, particularly because of the incorporation of a healthy, starting-caliber center in Clint Capela. But it’s hard to discern that improvement if you look only at their fourth-quarter stats.

The Hawks are scoring 26.2 points (24th in the NBA) in the fourth quarter, on average, but giving up 28.9 (29th), which gives them the worst plus-minus, or point differential, in the fourth quarter in the NBA at minus-2.7. When leading after the third quarter, the Hawks are now 9-6 (they’re 0-1 when tied after the third quarter, and 2-6 when trailing).

Basically, in the final period, things are going sideways more often than the Hawks would like.

In losses to the Nets (Jan. 27) and Lakers (Feb. 1), the Hawks gave up a few crucial offense rebounds down the stretch, which helped swing the game the wrong direction. In Wednesday’s loss, it was a different issue: There was only one possession the Mavericks scored on that involved a schematic mistake on the Hawks’ part, per Pierce.

The rest was a lack of urgency on defense, as the Hawks struggled to close out and make the Mavericks work (Dallas was 7-for-9 from 3-point range and shot 68.2% in the third quarter, outscoring the Hawks 37-27).

“Nothing to do with a scheme, just a sense of urgency to make them do something else. … They were scoring because of our lack of urgency,” Pierce said. “So I use the term ‘three-minute defense,’ it really isn’t about the three minutes. There’s going to be some point in the fourth quarter where you have to lock in your defense and all of the schemes go out the window, it’s a multiple-effort (game), it’s a one-more mentality.”

That was a point of emphasis in Thursday’s practice, Pierce said.

“Every game is going to be different; it’s going to call for something different,” Pierce said. “I can’t tell you what tomorrow’s urgency will be. The urgency to get under pick-and-rolls, maybe tomorrow, the urgency to get out in transition, basketball doesn’t give you a blueprint of ‘this is what you do every game.’ The urgency is abut making plays, making multiple efforts, and committing to it, finding ways to win the game. How do you win the game. There’s no same script.”

That fourth quarter proved particularly difficult for the Hawks, as the Mavericks effectively spaced them out, which is challenging for Capela (that also happened when the Hawks blew a lead in a loss to the Nets on Jan. 27, after which Pierce said that Capela got tired late in the fourth quarter “defending nothing but a small lineup.”) But overall, Capela has paired extremely well with power forward John Collins and vastly improved the Hawks’ defense with his rim protection, organization and rebounding.

If you look at the big picture, the Hawks have the No. 13 defensive rating in the league (110.5), a significant step forward from where they finished last season (No. 28 at 114.4).

Still, though, there’s a long list of games where the Hawks have entered the fourth quarter with a lead but couldn’t preserve it: Dec. 30 vs. the Nets (three-point lead, lost 145-141), Jan. 2 vs. the Cavaliers (four-point lead, lost 96-91), Jan. 4 vs. the Knicks (four-point lead, lost 113-108), Jan. 27 vs the Nets (four-point lead, lost in OT 132-128), Feb. 1 vs. the Lakers (one-point lead, lost 107-99), Wednesday vs. the Mavericks (nine-point lead, lost 118-117).

The Hawks feel like they’re nearing the end of their rebuild, and hope to reach the playoffs this season. Before they get there, though, they’ll need to learn how to win in crunch time, per Collins, who is the longest-tenured Hawk in his fourth season.

“It’s been a big Achilles heel for us. … Being a young team, and then on top of it, it’s the NBA,” Collins said. “There’s blowouts every now and then, but most of the games are close, most of the games are competitive, night in and night out. Those instances separate the great teams from the OK teams, those late-game execution moments, those quick decisions, the mentality, everything for those late-game moments truly matters.

“And I feel like that’s where we can take that next leap because we have all the components to get us there.”