After alternating wins and losses over the previous 10 games, the Minnesota Timberwolves were simply satisfied to pull out a victory against the Mavericks that stopped the back-and-forth swing.

Dallas lamented missed opportunities and a chance to continue its improved play of late.

Karl-Anthony Towns had 28 points, Jimmy Butler scored 10 of his 22 in the fourth quarter and Minnesota held on for a 97-92 win Sunday night.

"Just win, win the game," Timberwolves coach Tom Thibodeau said. "Dallas has played well. If you watch their games, you would know how tough they've been playing. So I knew it was going to be a hard-fought game."

Towns added 12 rebounds, including four on the offensive end, for his NBA-leading 21st double-double of the season. Minnesota committed 18 turnovers but hit four free throws at the end to pull away in a game in which no team led by more than six points.

Jamal Crawford had 16 points off the bench for the Timberwolves (16-11), who won back-to-back games for the first time since Nov. 15-17.

"They're not always going to be pretty wins," Crawford said. "When you go through tough stretches and still find a way to win, I think that says a lot about your group."

Harrison Barnes scored 19 and Maxi Kleber tied a career high with 16 points for Dallas, which has lost three in a row. The Mavericks, who had won four of six before the skid, shot 41 percent in the second half despite going 8 of 19 on 3-pointers.

"We can't complain with the shots," Barnes said. "We had layups, we had open 3s, open 2s. Our shots didn't fall. From an execution standpoint we did everything we're supposed to do."

J.J. Barea sparked Dallas with 14 of his 16 in the second half, including a driving bank shot with two minutes left to give the Mavericks their final lead at 90-89. Butler followed with a turnaround jumper to put Minnesota back in front.

Barea added a pair of free throws with 24.9 seconds left to pull Dallas to 93-92. But Crawford and Taj Gibson each hit a pair of free throws to secure the victory for Minnesota, its third in the past four games.

"The best part is we found a way to win, so we'll take the positives as they are," Towns said.