Buddy Hield tipped in a Harrison Barnes miss at the buzzer, and the visiting Sacramento Kings beat the Denver Nuggets 124-122 in overtime on Wednesday night in the season opener for both clubs.

Hield finished with a team-high 22 points, Barnes and De’Aron Fox scored 21 apiece, Cory Joseph added 15 and Marvin Bagley III (13), Tyrese Haliburton (12) and Nemanja Bjelica (10) also scored in double figures for Sacramento.

Nikola Jokic led Denver with 29 points, 15 rebounds and 14 assists. Michael Porter Jr. scored 24, Paul Millsap and Will Barton had 16 each and Gary Harris added 10.

The Nuggets led by four in the final minute of overtime before Barnes hit two baskets, the last one with 6.5 seconds left, to tie it. Denver called a timeout but Barnes stole the inbounds pass from Jokic. Barnes missed a dunk attempt, but Hield came down the other side of the lane and tipped it in as time expired.

The Kings maintained a lead through most of the fourth quarter, and they led by seven after Haliburton sank two free throws with 7:45 left.

The Nuggets rallied to take a 110-109 lead on two Jokic foul shots with 2:36 left. Fox quickly gave Sacramento the lead again with a pull-up jumper, and Barnes sank one of two free throws to make it 112-110 with 1:49 left.

Both teams missed chances before Jokic hit a pair of foul shots with 29.4 seconds left to tie it. Haliburton missed a wide-open 3-point try, and Jokic’s offensive foul with 2.6 seconds left spoiled a chance for Denver to win it.

The Nuggets led 68-61 early in the third quarter when Sacramento started to take control. Richaun Holmes and Fox hit jumpers, Bagley made two foul shots, Hield sank three free throws and Bagley hit a short shot in the lane to give the Kings their first lead, 72-70, midway through the third.

Sacramento outscored the Nuggets 36-24 in the third to lead 89-84 heading into the fourth.

Denver led by six after a quarter and had its biggest lead, 60-51, late in the second period before settling for a seven-point halftime advantage.