MINNEAPOLIS(AP) Dwyane Wade was his usual remarkable self on Tuesday night against Minnesota, and it almost wasn't enough.

Wade had 31 points and eight assists in a wildly entertaining duel with Randy Foye, and Shawn Marion hit the go-ahead free throws with 22 seconds left to lift the Miami Heat to a 99-96 victory over the Timberwolves.

"He does so much for us and we don't take it for granted,'' Heat coach Erik Spoelstra said of Wade, who also had three blocks and three steals. "We realize that that's his greatness: to be able to close out games after playing 38 minutes already and to make big plays on both ends of the floor.''

Looking more and more like the clutch performer he was at Villanova, Foye went toe-to-toe with Wade and never backed down. He scored 14 of his 29 points in the fourth quarter, but he couldn't get the Timberwolves their sixth straight victory.

Foye had a shot to take the lead after Marion's free throws, but Wade swatted the layup attempt away and Rodney Carney rushed a 3-pointer that was off the mark.

Spoelstra said Wade "had his hands full with Foye. Foye is a heck of a player.''

The man who is earning the nickname "Fourth Quarter Foye'' had one more chance to tie the game in the closing seconds, but his 3-pointer was off the mark as his Wolves lost for the first time in 2009. He also finished with eight assists and five rebounds.

"You can't ask anything more out of him than that,'' Wolves coach Kevin McHale said.

Marion finished with 16 points and 11 boards. Udonis Haslem had 17 points and 10 rebounds.

Wolves star forward Al Jefferson had nine points and was just 4-of-14 from the floor. He had to get seven stitches at halftime to close a cut over his right eye and played only sparingly in the final period.

The Timberwolves led 91-86 with 4:23 to play, but had three costly turnovers on ill-advised outlet passes to allow Miami to hang around.

"We had plenty of opportunities to win that game, but we let the game slip away,'' Foye said.

After a dominant first half, Wade was held to two points in 20 minutes of the second half. But he got a three-point play, then dunked an alley-oop pass from Marion to put the Heat back in front, 93-91, with less than 3 minutes to go.

"Yeah, it's just about winning time, and knowing the right time to attack and when to go,'' Wade said. "I felt that I passed enough in the second half and at the end you just have to be aggressive.''

Making up for lost time after playing in only 51 games because of injury last season, the NBA's leading scorer did what he's been doing all season: attacked from the opening tip. Wade scored 12 points in the first quarter - two on a soaring alley-oop throwdown - and had 21 by halftime.

He split double-teams like they weren't even there, got out in transition for easy layups and, of course, got to the free throw line, where he made nine of 11 attempts.

"He was just a one-man gang going to the basket,'' McHale said.

The Heat made 30 of 38 free throws while Minnesota was just 9-for-13.

All that sweat and sizzle, though, and the Heat were still down 13 points in the second quarter. Aside from Haslem, Wade's teammates were nonexistent offensively while the Wolves had much more balance.

It wasn't until those sidekicks got going that Miami made its move. Marion scored 10 points in the third quarter and Haslem added seven. Wade was held to two points in the period, but Chris Quinn's 3-pointer less than 20 seconds into the fourth tied the game at 76.

Michael Beasley's jumper with just over 9 minutes made it 80-78, the Heat's first lead since early in the first quarter.

Notes: In pregame warmups, Wolves G Rashad McCants took a couple shots while sitting on the bench, which is exactly where he's been for the entirety of four of the last five games. ... It was Haslem's 400th career game and he also scored his 4,000th career point in the second quarter. ... The Timberwolves made 11 3-pointers, the first time in franchise history they have had three straight games with at least 10 makes from long distance.

Copyright 2008 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited