This wasn’t revenge. It wasn’t the final game of the season and no playoff spot was on the line—not yet, anyway. It was a late November game against a team that’s still figuring out their identity in the aftermath of a star player demanding out. But the Denver Nuggets secured a much needed victory when they beat the Minnesota Timberwolves 103-101 on Wednesday night.

The Nuggets have struggled to keep their opponents off the free throw line lately, yet somehow managed to play the entire first quarter without committing a foul. But Denver has also struggled to knock down their wide open looks all season long, and that problem did plague them in the opening 12 minutes. Paul Millsap was the only starter to find the bottom of the net with consistency as Denver only managed 23 points.

Robert Covington—who, along with Dario Saric, comprises the return on the recent Jimmy Butler trade with Philadelphia—made a big impact early by knocking down two threes and bothering Denver on the defensive end. The Wolves hit on over half of their looks and led 25-23 after one.

Denver’s luck with the whistle was flipped on its head in the second quarter. The Nuggets were called for 11 fouls—seven of them coming in a three minute span—and the Wolves capitalized. Minnesota knocked down 11 of their 14 attempts, creating a nine point advantage in the first half as Denver made their only two free throws—a significant advantage considering the Nuggets trailed by six as the two teams headed into the locker room.

Despite Paul Millsap’s eleven points on 5-6 shooting, and Malik Beasley’s 11 on a perfect 4-4, Denver trailed 56-50 at the half. Karl Anthony Towns, who picked up two early fouls in the first quarter, was not dissuaded by the officiating. KAT finished the half with a game-high 13 points, six of them coming in the final three minutes. His counterpart, Nikola Jokic, was again guarded by Taj Gibson. Jokic put up five assists and seven rebounds, but Gibson bothered him, and he hit on just two of his seven attempts from the field. He was a team low -9.

“It’s only a matter of time,” was a favorite of the Minnesota broadcast crew on Fox Sports North for much of the first half. They were referring to Denver’s inability to knock down their open looks, a trend they didn’t expect to last. They were correct. The Nuggets would launch an aerial assault in the third, knocking down 6 of their 11 3-pointers, and finishing the quarter with 35 points.

Of course, just ask Michael Malone and he’ll tell you: easy offense follows stellar defense—a philosophy his team subscribed to in the game’s pivotal quarter. They held the Wolves to just 18 points on 5-19 from the floor, and forced seven turnovers. The Nuggets grabbed control of the lead, and pushed it to a game-high 13.

It’s par for the course for the Nuggets to be in control, or at least within shouting distance, of a game as it enters its final 12 minutes. Unfortunately, it’s also par for the course for them to fall apart in those final 12 minutes, which they almost did again on Wednesday night. Derrick Rose and the Timberwolves opened the fourth like a shot out of cannon, they blasted the Nuggets with a 14-2 run, leaving them stunned.

Denver was reeling, bleeding out on the hardwood, but after missing his first seven 3-point attempts of the game, Gary Harris cauterized the wound by knocking down a huge one with five minutes remaining. It pushed the lead to four, a lead Denver would cling to for dear life for the remainder of the game. It wasn’t pretty, but they left the target center with a crucial victory and avoided the sweep on their three game road trip.

The Nuggets will return home for just one game as they host the Orlando Magic on Friday night. That game tips off at 7 pm MT.