PHOENIX -- Houston guard Patrick Beverley scored 12 of his 20 points in the fourth quarter, including the go-ahead 3-pointer with 34.2 seconds left, and the Rockets rallied to beat the Phoenix Suns 115-112 Sunday night.

Center Dwight Howard had a team-high 25 points and nine rebounds, and guard James Harden added 23 points, seven assists and five boards for the Rockets (38-18). Houston enjoyed a 64-42 scoring edge in the paint while winning for the ninth time in 10 games.

Guard Goran Dragic scored 19 of his career-high 35 points in the second quarter, and backcourt mate Gerald Green added 18 of his 23 in the third for the Suns, who hit 11 of 19 3-pointers in the first three quarters but missed all seven tries in the fourth.

The Suns (33-22) had their three game winning streak snapped, and they lost for just the fifth time in 16 games.

Phoenix led 98-89 with 7:42 left before the Rockets scored seven straight points -- including a four-point possession when a clear-path foul on Marcus Morris led to two free throws by forward Chandler Parsons and a step-back jumper by Harden.

The Suns took their last lead at 110-108 on a layup from forward Markieff Morris with 47.3 second left, but Beverley answered with his 3-pointer and added two free throws to extend the lead to three. Phoenix had one last chance to tie, but Dragic missed a 3-pointer to give Houston its second win in its past eight trips to Phoenix.

The Rockets scored 60 points in the first half for the seventh time in the last nine games, but they couldn't run away from the Suns.

Houston outscored Phoenix 22-4 in the paint to lead 30-14 after one quarter. Forward Terrence Jones had nine points and Howard added seven points and five rebounds. The Suns shot just 32 percent from the field and had just two fast-break points.

The Suns heated up in the second quarter -- with the former Rocket Dragic leading the way.

After a three-point play by center Omer Asik pushed the Houston lead to 37-19 with 9:55 left, the Suns went on separate runs of 14-4 and 15-0 reel in the Rockets.

Dragic made all seven of his shots from the field and all five of his 3-pointers, tying the game at 45 on a 3-pointer with 4:10 left and giving the Suns a 48-45 lead with another 28 seconds later.

The Rockets responded with a 11-0 run, including five of Howard's 18 first-half points. But Dragic closed the half with two more 3-pointers in the final 1:37, and two free throws from Green cut the Suns' halftime deficit to 60-56.

Green took over in the third quarter for Phoenix. After scoring just four points in the first half, Green had 18 in the third quarter on 7-for-9 shooting. He had eight during a 12-1 Phoenix run that put that turned a 69-65 deficit into a 77-70 lead, then capped the quarter with a 30-foot bank shot with six-tenths of a second left to put Phoenix on top 93-83.

NOTES: The Suns celebrated the 20th anniversary of Kevin Johnson's famous baseline dunk over the Rockets' Hakeem Olajuwon in the 1994 Western Conference finals by handing out "KJ Dunk Night" placards to all fans. Johnson made an appearance at halftime to talk about the dunk and the series, which the Rockets won in seven games. ... Suns G Leandro Barbosa missed his second consecutive game due to a sprained left big toe. ... Houston G James Harden injured his elbow during his 39-point effort Thursday at Golden State, but he practiced Saturday and was good to go Sunday. ... The Suns have used only six players in their 55 starting lineups this season -- injured G Eric Bledsoe is the only other Sun to start besides G Goran Dragic, G Gerald Green, F P.J. Tucker, F Channing Frye and C Miles Plumlee. Portland is the only other team to start as few as six players. ... The game featured two of the NBA's top five fast-break teams. The Suns lead the league at 18.7 fast-break points per game, while the Rockets are fifth with 17.1 points.