PHOENIX -- The Houston Rockets had to overcome 22 turnovers, a torrid shooting display from the Phoenix Suns backcourt in the first three quarters and a 10-point deficit in the fourth Sunday, but they continue to show they are jelling as a unit.

Guard Patrick Beverley scored 12 of his 20 points in the fourth quarter, including the go-ahead 3-pointer off guard James Harden's feed with 34.2 seconds left, and the Rockets rallied to beat the Suns 115-112.

Houston (38-18) earned its ninth win in 10 games.

Rockets center Dwight Howard finished with a team-high 25 points and nine rebounds, and Harden added 23 points, seven assists and five boards. Houston enjoyed a 64-42 scoring edge in the paint, but it was a long-distance shot from Beverley that made the difference.

"We have to understand that teams are going to lock in on James and Dwight on those plays," Beverley said. "I was in the weak-side corner. I told James I would be there, and he made a phenomenal play. That was a big shot, but the way we defended in the fourth quarter was the key to this game."

The Rockets let an 18-point, second-quarter lead get away, then scrambled back late. For Harden, the win made a statement.

"Early in the season, we probably would have let that game slip away," he said. "It shows the maturity and the growth of our team during the season. We have confidence in (the younger players) to go out and hit big shots and make big plays."

Suns 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. Dragic and Green were a combined 20-for-28 from the field in the first three quarters, but they missed eight of 10 in the final period.

Forward Markieff Morris had 21 points off the bench for Phoenix, which 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.

"(The 3-pointers) got us back in the game after we started off poorly, but then it went the other way," Phoenix coach Jeff Hornacek said. "The fourth quarter, I felt like we had some decent looks, but some of them were forced.

"When the game was on the line, they made the plays."

Houston sank 28 of 32 free throws, and its starters scored 96 points -- with all five scoring at least 13.

"Green was making shots and (Dragic) had that second quarter when he was just on fire, but we kept everyone else out of the game mostly," Houston coach Kevin McHale said. "It was a good win. We had a big lead and we let it get away, got down 10 in the fourth and won the game. That's a hell of a win for us."

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 committed by Suns forward 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 Markieff Morris with 47.3 second left, but Beverley answered with his big 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. Houston outscored Phoenix 22-4 in the paint to lead 30-14 after one quarter.

"We can't afford to start games like that," Dragic said. "We were down 18 points, and it takes a lot of energy to come back. Your tank is empty in the fourth quarter, and because of that we lost the game."

NOTES: The Suns celebrated the 20th anniversary of Kevin Johnson's famous baseline dunk over Houston's 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 with 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 to this point. ... The game featured two of the NBA's top five fast-break teams. Entering Sunday, the Suns led the league with 18.7 fast-break points per game, while the Rockets were fifth with 17.1.