HOUSTON — High-scoring DeMar DeRozan knows he's going to start getting some new looks and will have to find ways to make an impact when defences are focusing on him.

On Wednesday night, he found that opening in the third quarter, scoring 21 of his 24 points in the period to help the Toronto Raptors beat the 115-102 to snap a two-game skid.

DeRozan ranks second in the NBA behind Russell Westbrook by averaging 30.5 points a game.

He discussed the adjustments he made after scoring just three points in the first half.

"Just be aggressive. Just take it from how they were playing me," he said. "I was trying to be a passer, get everybody else involved. Pick them apart. Just me understanding that teams are going to play me differently than they would have a week ago. Just me being more conscious of that and picking and choosing my spot.

Raptors avoided losing three in a row for the first time since last November, and ended a nine-game losing streak in Houston.

James Harden had 29 points and 15 assists for Houston, but also had 12 turnovers. The Rockets lost for the first time in four games.

The Rockets trailed by 15 entering the third quarter before using a 9-2 run to open the second half and get to 56-48. That run was powered by a pair of 3-pointers by Trevor Ariza and a third by Patrick Beverley.

DeRozan got hot soon after that, scoring all of Toronto's points in an 11-7 run that extended the Raptors' lead to 72-57 midway through the third quarter. DeRozan had a two-handed dunk during that stretch and capped it with a 3-pointer. He made 8 of 12 shots in that period, including both of his 3-point attempts and also had four assists and three rebounds in the frame. He finished with nine assists, five rebounds and two steals.

"When you're down (big) at halftime and he has not done anything you know you might be in a little bit of trouble because he's going to do something," Houston coach Mike D'Antoni said. "He's that good of a player."

The Rockets cut into the lead with an 18-8 run, highlighted by 3-pointers from Ryan Anderson and Harden, to get within seven points with about 2 minutes remaining. But DeMarre Carroll hit a 3-pointer before a turnover by Harden led to a dunk by him to thwart the comeback attempt and extend the lead to 111-99 with 90 seconds left.

The Raptors led by two early in the second quarter before going on 16-6 run to make it 46-34 with about 2 1/2 minutes in the first half. Kyle Lowry started that spurt with a 3-pointer and had six points in that span.

TIP-INS

Raptors: DeRozan received a technical foul in the third quarter. ... Carroll finished with 20 points and three blocks. ... Lowry had 17 points and nine assists. ... Jonas Valanciunas had 15 points and 16 rebounds.

Rockets: Houston finished with 14 3-pointers, to give the team at least 10 in 14 straight games. ... Montrezl Harrell got a technical for taunting late in the second quarter. ... Wednesday was the first time Houston has lost since Beverley returned after missing the first 11 games after arthroscopic knee surgery. He had 10 points and 10 rebounds and four assists.

TURNOVER AND OVER

The Rockets had a season-high 28 turnovers after averaging just 13.1 in their previous seven games. The Raptors converted those miscues into 33 points.

"I just think we didn't make characteristic plays," Ryan Anderson said. "We didn't play like we really have been. I don't know what the reason was but ... we were just a little flat."

SUPER SIMONES

Olympic gold medallists Simone Biles and Simone Manuel were honoured on the court during a timeout in the second quarter. Manuel was born in the Houston area and Biles now lives in the city. Biles won four gold medals and one bronze in gymnastics at the Rio Olympics this summer. Manuel two gold and two silver medals in swimming in Rio.

UP NEXT

Raptors: Travel to Milwaukee on Friday.

Rockets: Travel to Sacramento on Friday to start a five-game trip.