Updated

Steve Nash hit a driving layup with 5 seconds left, giving the Phoenix Suns a 107-105 victory over Milwaukee Bucks on Tuesday night.

Nash, who also celebrated his 38th birthday Tuesday, had 18 points and 11 assists.

Michael Redd scored 14 points and came away with a win against his former team, but it wasn't easy. The Suns blew a big lead in the second half and had to rally at the end.

Marcin Gortat scored 21 points and Jared Dudley added 19 for the Suns, who have won three straight.

Drew Gooden scored a season-high 25 for the Bucks, who have lost three straight.

Mike Dunleavy and Ersan Ilyasova added 17 points each for the Bucks. Brandon Jennings was held to three points on 1-for-4 shooting.

With the game tied at 98, Jennings hit a 3-pointer with 3:11 left — his first points of the game, on only his second shot.

Dudley hit a pair of free throws to cut the lead to one, then Nash hit a 3-pointer for a 103-101 lead with 2:05 left.

Gooden scored on a driving layup to tie it, but Gortat hit a jumper. Ilyasova was fouled on the other end and hit a pair of free throws to tie it again.

The Suns called timeout with just over 20 seconds left, and Nash dribbled near halfcourt for several seconds before slicing through the Bucks' defense and scoring to give Phoenix the lead. The Bucks couldn't get a shot off on their final possession.

It was an emotional return to Milwaukee for Redd, whose 11-year Bucks career ended with a series of injuries on a big, expiring contract. Now coming off the bench for the Suns, Redd played a key role in a second-quarter surge to take control of the game.

Phoenix led 67-50 at halftime, tying the Bucks' season high for most points allowed in a half — a mark Milwaukee set only three days beforehand against Chicago.

The victory made for a happy homecoming for Redd, who said before the game that it felt strange staying in a hotel, instead of at home, in Milwaukee. When he got to the arena, he said an equipment manager had to stop him and tell him he was walking toward the wrong locker room.

Redd didn't know what kind of reception he would receive from the fans.

"I know where I stand with our fan base," he said before the game. "I've always been appreciative of the fans, in the good times and the bad times, Milwaukee has great fans. In 11 years, they've seen me grow up and seen me get married, see me have kids. So I have nothing but love."

The Bucks showed a short video tribute during the first time out of the game. Fans responded with a warm ovation and Redd waved back.

Redd entered the game later in the first quarter — then began to look like his old self in the second quarter, scoring eight straight points for the Suns. Redd's turnaround jumper gave the Suns a 46-32 lead with 8:46 left before halftime, and it only got worse from there for Milwaukee.

But the Bucks made a big third-quarter surge as the Suns suddenly went cold. Milwaukee cut the lead to 86-79 on a 3-pointer by Dunleavy with 1:15 left in the quarter but Redd answered with a driving layup. Phoenix led 88-81 going into the fourth quarter.

Dunleavy hit a pair of 3 pointers early in the fourth, helping the Bucks cut the lead to one.

Stephen Jackson then hit a 3-pointer from the top of the key, giving Milwaukee a 92-90 lead.

Milwaukee later led 96-93 on a jumper by Jackson, but Channing Frye hit a long jumper and Dudley made a 3-pointer to give the Suns a 98-96 lead with 4:07 left.