INDIANAPOLIS (AP) — Nikola Jokic scored 24 points in 21 minutes to help the Denver Nuggets overcome an 18-point deficit in the second half and rally past the Indiana Pacers 122-119 on Wednesday night.

Jokic was in foul trouble most of the night and sat from the 11:02 mark of the third quarter until early in the fourth with five fouls. But when the Nuggets needed him most, the two-time NBA MVP pulled them through.

Denver has won four straight and six of seven. Aaron Gordon had 18 points and tied a career-best with 17 rebounds.

Indiana led most of the second half but struggled to stop Jokic and Denver’s 3-point shooters down the stretch. Myles Turner missed a 3 at the buzzer that would have forced overtime.

Bennedict Mathurin led the Pacers with 30 points, including 23 in the first half. Tyrese Haliburton had 21 points and 11 assists.

The Pacers took an 18-point lead midway through the third quarter, but Denver methodically cut into the deficit. And when Jokic made back-to-back short jumpers midway through the fourth, the Nuggets finally had a 108-105 lead.

Indiana tied the score at 117 on a long 2-pointer from Haliburton, but Jokic broke the tie with a 20-footer on the ensuing possession.

Indiana had its two-game winning streak snapped.

TIP-INS

Nuggets: Michael Porter made three 3s to extend his career-best streak to nine games with three or more from beyond the arc. He had 17 points. … Jamal Murray finished with 18 points. … Kentavious Caldwell-Pope added 15 points on a night when Denver had 20 turnovers.

Pacers: Scored a season-high 43 points in the second quarter, falling just short of the best scoring half of the season (75). … Mathurin made eight of his first 10 shots and was 6 of 9 on 3s. … Indiana rookie Andrew Nembhard started his second straight game and had eight points and five assists.

UP NEXT

Nuggets: Make the third stop on a four-game road trip Friday at Boston.

Pacers: Close out a four-game homestand Saturday against Toronto.