Rudy Gay scored a season-high 32 points and the Memphis Grizzlies won their fourth straight with a 104-93 victory over the Phoenix Suns on Wednesday night.

Memphis outscored the Suns 17-6 after Phoenix tied the game at 87 with 6:27 left. Dante Cunningham had six of his 10 points during the stretch run.

Zach Randolph had 17 points and nine rebounds for Memphis, which won for the ninth time in the last 11 games. O.J. Mayo finished with 15 points, and Mike Conley had 12 points and seven assists.

Marcin Gortat had 19 points for Phoenix on 9 of 12 from the floor, while Shannon Brown scored 18. The Suns' two-game winning streak was snapped. They are 10th in the Western Conference.

Rookie Markieff Morris had 17 for Phoenix, and Steve Nash had 11 points and 10 assists.

The victory, coupled with the Los Angeles Clippers' 100-98 win at Oklahoma City, left the Grizzlies a half-game behind the Clippers for the fourth seed and home-court advantage in the Western Conference playoffs.

Memphis led 59-53 in a first half that saw very little defense for either team. Both teams were shooting 59 percent at the half, each hitting 24 of their 41 shots. Both teams were above 60 percent until the final minute of the half.

The Suns relied on the inside presence of Gortat, who had 15 points in the half, missing only one of his eight shots. Josh Childress was perfect on his five shots in the half for all of his 10 points in the game, and Phoenix had 42 points in the paint.

Gay led Memphis with 17 points on 7-of-8 shooting, while Randolph had 13 points.

Memphis grabbed the first double-digit lead of the game early in the second half after a pair of technical fouls, one on Nash for a no-call, another on Brown during a scrum for position on an inbounds pass, contributed to a 65-55 lead.

The Suns whittled it to 70-67 before Memphis rebuilt the advantage to 80-72 heading to the fourth.

Phoenix opened the final period with an 11-1 run, and the game settled into a series of lead changes and ties, the final one coming a drive by Sebastian Telfair, knotting the score at 87 with 6:27 left.

Memphis then scored six straight points, part of a 13-4 run to take the lead to 100-91.

After the Suns' dominance inside in the first half, Phoenix managed to outscore Memphis in the paint by 56-54.

NOTES: The Suns missed a chance to sweep the Grizzlies for the first time since the 2007-08 season. .Grant Hill missed his ninth game after undergoing right knee surgery on March 30. The Suns are 5-4 since the injury. .Nash's 10 assists marked his 36th game this season with 10 or more. .Gay's point total was his first 30-point game since Dec. 26, 2010, at Indiana, when he scored 30.