Deandre Ayton scored 24 points, Chris Paul added 15 points and 11 assists, and the Phoenix Suns tied a franchise record of 17 straight wins by beating the Golden State Warriors 104-96 on Tuesday night in an early showdown between the NBA's top teams.

The Suns won despite losing star guard Devin Booker to a left hamstring injury in the second quarter. He had 10 points and two rebounds in 15 minutes. The 25-year-old appeared to get hurt when driving to the basket for a layup, grabbing at the back of his left leg before walking to the locker room a few minutes before halftime.

Even without Booker, the Suns led 56-54 at halftime and 80-78 going into the fourth quarter. The game stayed tight, and neither team led by double digits until Landry Shamet knocked down a 3-pointer — on an assist by Paul — with 54.4 seconds left.

Golden State Warriors center Kevon Looney (5) shoots over Phoenix Suns forward Jae Crowder (99) during the first half of an NBA basketball game, Tuesday, Nov. 30, 2021, in Phoenix. (AP PhotoMatt York)

Golden State Warriors center Kevon Looney (5) shoots over Phoenix Suns forward Jae Crowder (99) during the first half of an NBA basketball game, Tuesday, Nov. 30, 2021, in Phoenix. (AP PhotoMatt York)

It was a highly anticipated showdown, as Suns and Warriors have NBA’s best records. It was also the first time in league history that two teams from the same division played each other with winning percentages of .850 or higher after at least 20 regular-season games, according to Elias Sports Bureau.

The game mostly lived up to the hype — at least until the Warriors, who had their seven-game winning streak snapped, went cold in the fourth quarter.

Jordan Poole led Golden State with 28 points. Stephen Curry — who came into the game averaging 28.6 points per game — had 12 points on 4 of 21 shooting, including 3 of 14 from 3-point range.

Golden State Warriors guard Stephen Curry (30) dishes off against the Phoenix Suns during the first half of an NBA basketball game, Tuesday, Nov. 30, 2021, in Phoenix. (AP PhotoMatt York)

Golden State Warriors guard Stephen Curry (30) dishes off against the Phoenix Suns during the first half of an NBA basketball game, Tuesday, Nov. 30, 2021, in Phoenix. (AP PhotoMatt York)

The Suns limited the Warriors to just 42 points in the second half.

The Suns and Warriors are now both 18-3. The only other time Phoenix has won 17 straight games was during the 2006-07 season. They'll go for their franchise record 18th win against the Pistons on Thursday.

The Suns hadn't lost since Oct. 27 when Harrison Barnes hit a game-winning 3 at the buzzer for the Sacramento Kings.

Phoenix Suns center JaVale McGee shoots as Golden State Warriors forward Juan Toscano-Anderson, right, defends during the first half of an NBA basketball game, Tuesday, Nov. 30, 2021, in Phoenix. (AP PhotoMatt York)

Phoenix Suns center JaVale McGee shoots as Golden State Warriors forward Juan Toscano-Anderson, right, defends during the first half of an NBA basketball game, Tuesday, Nov. 30, 2021, in Phoenix. (AP PhotoMatt York)

TIP-INS

Warriors: F Andre Iguadola (right knee), G Damion Lee (personal), G Klay Thompson (right Achilles recovery) and C James Wiseman (right knee recovery) didn't play. ... F Andrew Wiggins was bothered by back spasms earlier Tuesday but played. He finished with 10 points in 33:17 minutes. ... The Warriors lost despite a 51-35 rebounding advantage and leading 40-14 on points in the paint.

Suns: F/C Frank Kaminsky (right knee), F Abdel Nader (right knee) and F Dario Saric (right knee) didn't play. ... Booker hasn't missed a game this season. He was averaging nearly 24 points per game before Tuesday. ... Cam Johnson started the second half for Booker and finished with 14 points. ... Ayton finished 11 of 19 from the field and also had 11 rebounds.

Golden State Warriors forward Andrew Wiggins shoots as Phoenix Suns guard Devin Booker (1) defends during the first half of an NBA basketball game, Tuesday, Nov. 30, 2021, in Phoenix. (AP PhotoMatt York)

Golden State Warriors forward Andrew Wiggins shoots as Phoenix Suns guard Devin Booker (1) defends during the first half of an NBA basketball game, Tuesday, Nov. 30, 2021, in Phoenix. (AP PhotoMatt York)

UP NEXT

Warriors: Host the Suns on Saturday.

Suns: Host the Pistons on Thursday night.

More AP NBA: https://apnews.com/hub/NBA and https://twitter.com/AP_Sport