In the end, after a ragged, back-and-forth affair, Wolves guard Jimmy Butler said he’s seeing progress.

“I think so,’’ Butler said. “We did what we’re supposed to do.’’

In this case it was score and defend just enough. After three days off that might have left the team a bit flat, the Wolves, down by a point with two minutes left to play, rallied for a 97-92 victory over Dallas at Target Center on Sunday.

It wasn’t pretty. At times it was strikingly physical, as it was early in the fourth quarter, when Karl-Anthony Towns and the Mavericks’ Dwight Powell got matching technical fouls. But this time the Wolves, as Butler said, did what they’re supposed to do.

“Just win the game,’’ Wolves coach Tom Thibodeau said.

Minnesota (16-11) won back-to-back games for the first time since Nov. 17 and for only the second time while scoring under 100 points, a good way to start a five-game homestand.

Butler scored 10 of his 22 points in the fourth quarter. He also had seven rebounds and five assists. Towns finished with 28 points, 12 rebounds, three assists and three steals. Jamal Crawford came off the bench to score 16 points in 19½ minutes, including two free throws with 16.4 seconds that put the Wolves up 95-92. The Mavs missed a three-pointer and Taj Gibson hit one of two free throws with 8 seconds left, essentially icing the game.

“It’s not always going to be pretty wins,’’ Crawford said. “You learn more about a team when you have to go through some adversity. To go through tough stretches and come out with a win? It says something about the group.’’

Again, not perfect.

Neither team ever led by more than six points. There were 21 lead changes and 12 ties. For much of the first three quarters the Wolves gave the Mavericks too many open shots. But in the final 12 minutes — the fourth quarter has been a Wolves problem too many times this season — the Wolves shot 9-for-15 while holding the Mavericks to 8-for-20 shooting.

All five Dallas starters — plus former Timberwolf J.J. Barea off the bench — scored in double figures. Harrison Barnes led the way with 19. Barea and Maxi Kleber had 16 each.

Perhaps the most promising stat? The Wolves had a 20-8 edge on second-chance points while allowing the Mavericks only two fast-break points. For a team that has struggled mightily with its transition defense, the Wolves appear to be learning when to go for the rebound and when to get back. Thibodeau has been stressing this for a while now. Sunday, the Wolves found the balance.

Still, after Barea hit a bank shot with two minutes left, the Wolves were down 90-89 after leading by five only a couple of minutes before.

Butler hit a 17-footer out of a timeout. After Barnes missed a corner three, Andrew Wiggins — who had missed two free throws with his team leading by four with 4:10 left — hit a 6-foot turnaround with 1:12 left for a 93-90 lead.

The Wolves didn’t trail again. Barea made two free throws with 24.9 seconds left, but Crawford hit two of his own with 16.4 left.

Progress. Yes, the 7-20 Mavericks were riddled by injuries. But the Wolves have played down to the level of their opponents quite a few times this season. Sunday they played well enough to win despite the stops and starts.

“We still have our lapses at times,’’ Butler said of the Wolves defense. “We’re getting better.’’