Updated

Goran Dragic made a short hook shot from the left baseline with 0.5 seconds remaining and the Phoenix Suns edged the Memphis Grizzlies 82-80 on Wednesday to snap a seven-game losing streak.

Dragic had 12 points, and Shannon Brown and Jared Dudley scored 15 each for the Suns, who won for the first time since Nov. 27 at Cleveland.

Rudy Gay scored a game-high 21 points with 11 rebounds and Zach Randolph added 18 points and 10 rebounds for the Grizzlies, who have lost consecutive games for the first time this season.

Gay tied the game at 80-80 on a turnaround jumper from just to the right of the free-throw line with 46.8 seconds remaining. He had a chance to give the Grizzlies the lead with 12 seconds left, but his 17-foot jumper bounced off the rim, setting up Dragic's shot.

A lob attempt off the inbound pass by the Grizzlies was broken up by a pair of Phoenix defenders as time expired.

After trailing by as many as 11 points in the first half, the Suns took their first lead since the opening minutes on a layup by Dudley with 8:03 left in the third quarter before setting for a 63-all tie at the end of the period.

The teams traded baskets to open the final quarter before the Suns took a 73-72 lead on a 15-footer by Jermaine O'Neal with 7:35 remaining.

Phoenix stretched the lead to 80-76 on a hook shot by Marcin Gortat with 4:05 remaining, but missed a pair of shots, turned the ball over twice and did not score again until Dragic's decisive basket.

NOTES: The Suns have won five games this season after trailing by double digits, all at home. ... Phoenix is 4-3 in games decided by three points or fewer. ... Luis Scola returned to the Phoenix starting lineup after coming off the bench in the team's past 11 games. ... Memphis has not won in Phoenix since Dec. 8, 2010.