In a tournament setting, the wins don’t have to be pretty — they just have to be wins.

In the Las Vegas Summer League, the Pistons needed a win — pretty or otherwise — to move on. After a 1-2 mark in the preliminary rounds, the Pistons had the 25th seed and had a tough road in the first playoff round, with a matchup against the 8th-seeded Minnesota Timberwolves.

In the first half, the Pistons built a 19-point lead and looked to be on their way to a lopsided win.

Then it got ugly.

They gave up the lead, but held on in the final minute, taking a 64-59 victory over the Timberwolves on Wednesday night at Cox Pavilion. The Pistons move on to face the 24th-seeded Chicago Bulls in the next round of the 30-team tournament.

More: Beard: Big3 brings its big show to Detroit

Rookie Bruce Brown Jr. had 15 points, 11 rebounds, six assists and five steals, Eric Griffin 10 points and Zach Lofton nine for the Pistons.

Brown was the standout, moving from the wing to play point guard after Larry Drew II was injured and the Pistons needed another ballhandler down the stretch.

“He’s a versatile guy and he shows that on both sides of the ball,” assistant coach Sean Sweeney said on ESPN2. “He played point guard in college and him doing that is something we needed tonight.”

The Pistons had a 36-17 margin at halftime, but the Timberwolves chipped away throughout the third quarter. Minnesota had an 11-0 run to cut it to 42-36, before Lofton ended the drought. The Timberwolves finished the third quarter with a 26-11 margin, cutting it to a 47-43 margin entering the fourth quarter.

Henry Ellenson had a poor outing from the floor, going 3-of-17.

The Timberwolves cut the lead to 49-47, but Griffin scored on a putback to push the margin back to four. Minnesota answered with a 3-pointer, trimming it to 51-50 with 6:57 left. Jonathan Stark gave the Timberwolves the lead with a floater and Josh Okogie followed with a lay-in but the Pistons battled back.

Ellenson’s 3-pointer at the 4:19 mark tied it at 56 and Griffin followed with a transition dunk, for a 58-56 lead with 3:39 remaining. The Pistons didn’t trail again.

“The biggest thing we did down the stretch was to maintain our composure,” Sweeney said. “We tried to play each possession to completion down the stretch.”

Keita Bates-Diop had 16 points and nine rebounds for the Timberwolves, who fall into the consolation bracket.

Here are some observations from the game.

•Ellenson continued his shooting struggles, with an 0-for-9 start from the field, before making his first field goal at the 1:11 mark of the second quarter. He finished 3-of-17 but made two critical plays down the stretch, with a 3-pointer and a driving lay-in. It’s been a rough Summer League for Ellenson with his third poor-shooting outing.

•Brown showed that he can be a contributor at both ends of the floor, with five steals and another impressive showing, going 6-of-13 from the field and 1-of-2 on 3-pointers. When the Pistons needed him to switch to point guard, he looked good in the new role, as he’s done at both wing positions. He could make the Pistons’ rotation in the regular season just because of his versatility.

•Drew (back spasms) played only 17 minutes at point guard and when he couldn’t play the rest of the game, the Pistons had to look in for another option. It could be another opportunity for Brown to move over in the backcourt, if the injury doesn’t heal. The injuries are piling up for the Pistons, with Luke Kennard (knee strain) missing all of Summer League.

•Three-point shooting continues to be a struggle, as the Pistons shot just 25 percent (6-of-25), including 1-of-7 by Ellenson and 0-of-5 from Lofton. They had planned to get a boost from Kennard, but without their best 3-point shooter, they’ve struggled in three of their four games.

•Griffin had pedestrian numbers in the first three games, but was solid Wednesday, with 10 points and seven rebounds in 29 minutes. He shot 4-of-6 from the field and looked to be more active and aggressive in attacking the rim.

Twitter: @detnewsRodBeard