BOSTON — The Boston Celtics relied on their veterans to help them win the matchup of the NBA’s two hottest teams.

Paul Pierce had 27 points, 14 rebounds and 14 assists and the Celtics extended their winning streak to seven games with a 118-114 triple overtime victory over the Denver Nuggets on Sunday night.

Boston’s win also ended Denver’s winning streak at nine games.

Pierce made a tying 3-pointer in the second overtime to make it 107-107 and extend the game.

“I mean that’s what great players do. I would love to tell you I had something to do with it,” Celtics coach Doc Rivers said. “I was sitting just like the fans saying, “Please, Lord, Paul make a shot.”

Kevin Garnett had 20 points and grabbed 18 rebounds while Jason Terry scored a season-high 26 points off the bench.

“It seems like Garnett has a huge heart and wanted to win the game and he made some big time shots,” Nuggets coach George Karl said. “His range has improved and it’s about time he get that respect.”

Pierce, Garnett and Terry are the only active Celtics with championship rings since point guard Rajon Rondo’s season-ending knee injury.

The Celtics remain unbeaten in the star guard’s absence.

Terry hit a 3-pointer with 1:33 remaining in the third overtime to put the Celtics ahead 116-113.

Danilo Gallinari, who finished with 18 points and 10 rebounds, hit a free throw, but Denver would not get any closer.

Faried missed both free throws, but Celtics guard Avery Bradley knocked the ball out of bounds. Lawson then scored with 0.8 seconds remaining.

Gallinari, who averages 20 points per game to lead Denver, was held to three points in the first half on 1-of-6 shooting as the Nuggets trailed 50-46 at the break.

Notes: Pierce and Lawson each played 54 minutes respectively. ... JaVale McGee had 16 rebounds for Denver. ... Boston is 13-2 in its past 15 home games against Denver, but the teams are 10-10 head-to-head in the past 20. ... Boston matches up again on the road with Denver on Feb. 19. ... This had been the Nuggets’ longest winning streak since March 30 to April 15, 2005. ... Andre Iguodala left the game for Denver in the third quarter with a strain and did not return.