SACRAMENTO, Calif. — Dwane Casey's 500th career game as Toronto's coach had plenty of moments to go sideways, especially after his team let a 15-point lead slip away in the first half.

DeMar DeRozan's decision to be more aggressive in the third quarter kept the Raptors on track and they extended their longest winning streak of the season.

DeRozan scored 13 of his 25 points in the third quarter and Toronto held off the Sacramento Kings 102-87 on Sunday for its sixth straight victory.

Kyle Lowry added 15 points, 12 rebounds and six assists on an off-night shooting, Serge Ibaka scored 20 points, and C.J. Miles had 11 for the Raptors. They won for the first time in Sacramento since 2014.

"That's something we've got to fight for is consistency and make sure it doesn't become a habit," Casey said, referring to Toronto's blown early lead. "We've got to fight that. But I thought our defence carried us when we couldn't make shots."

Toronto led by 17-2 four minutes into the first quarter, but couldn't shake the Kings until the third when DeRozan repeatedly got into the lane and to the free throw line. He also made two late baskets in the fourth after Sacramento pulled to 90-83.

DeRozan shot 9 of 15 and was 7 of 11 on free throws while going over the 12,000-point mark for his career. He went into the day six points shy of the milestone.

"Just being aggressive, picking and choosing my spots, understanding my knack of trying to get to the free throw line, when I can get to the free throw line," DeRozan said. "That's all that was, me understanding the moment."

That helped extend Toronto's longest winning streak of the season and ended a four-game skid against Sacramento.

Casey is the winningest coach in franchise history.

"That means you're old," Casey said."

The teams will meet again in Toronto next Sunday.

Zach Randolph had 19 points and 11 rebounds for the Kings, and Buddy Hield added 17 points.

Two days after an overtime road victory in New Orleans, Sacramento couldn't sustain the momentum and dug a hole with eight turnovers in the first quarter. Toronto scored the first 13 points and led 17-2 on DeRozan's short jumper four minutes into the first quarter.

Sacramento cut it to five going into the second and went ahead 29-28 on Frank Mason's two free throws with 8:06 left before the Raptors went on another run late to go up 54-46 at halftime.

The Kings cut it to 67-64 on Bogdan Bogdanovich's 3-pointer midway through the third, but Lowry scored on a three-point play, added a 16-foot baseline jumper and made two free throws to help the Raptors pull away

Sacramento committed 21 turnovers, leading to 27 points for Toronto.

"We struggled to score the basketball and our turnovers were a big Achilles heel for us," Kings coach Dave Joerger said. "Their veterans All-Stars were terrific for them and kind of handled the game."

ON A ROLL

The six-game winning streak matches Toronto's longest since it won 11 straight during the 2015-16 season. The Raptors had a pair of six-game streaks last season.

GOING DEEP

Jakob Poeltl made his first career 3-pointer to open the fourth quarter for the Raptors. The ninth overall pick in 2016, Poeltl hadn't even attempted a shot beyond the arc before Sunday. "That's what we do. That's our secret weapon," Lowry said.

TIP-INS

Raptors: Lowry shot 4 of 17 and was 3 of 12 beyond the arc. . It was the first time that DeRozan won a game in Sacramento.

Kings: Hield scored 14 points in the first half on 6-of-8 shooting. ... Bogdanovic started in place of George Hilll, who was out because of personal reasons. ... Willie Cauley-Stein did not play because of a lingering sore back he initially hurt in Milwaukee on Dec. 2. ... Sacramento had eight turnovers in the first quarter.

UP NEXT

Raptors: At the Los Angeles Clippers on Monday night.

Kings: Host Phoenix on Tuesday night.

___

For more NBA coverage: https://apnews.com/tag/NBAbasketball