CLEVELAND -- George Karl called being on the court his sanctuary. Carmelo Anthony answered his coach's prayer.

Anthony scored 40 points, including the winning basket, and Denver overcame LeBron James' monstrous night to end the Cavaliers' 13-game winning streak with a 118-116 victory in overtime Thursday night in Karl's first game since revealing he has neck and throat cancer.

"I think he's happy," Anthony said of his coach. "This boosted his spirit up a lot. In the back of our mind, we know his situation. We're playing for him."

James had his triple-double by the end of regulation, and became the first NBA player with at least 43 points, 13 rebounds, 15 assists, two steals and four blocks, according to the Elias Sports Bureau.

James' triple-double came in front of Oscar Robertson, who averaged a triple-double during the 1961-62 season. He was honored before the game along with Jerry West, James and Anthony as co-captains of U.S. Olympic gold medal basketball teams.

Robertson and West captained the Americans' gold medal in 1960, while James and Anthony were the co-captains in 2008.

James is also the first player to have at least 40 points, 15 assists and 13 rebounds in a game since Robertson had 42 points, 18 assists and 15 rebounds on Feb. 13, 1962.

"In that sense, it's huge because of what he was able to do," James said. "But in the sense of us losing the ball game, it means nothing."

Anthony matched him shot for shot, hitting the winner on a deep jumper over an outstretched James with 1.9 seconds left.

"It's finally me being on the other end I guess," James said. "I'm so used to being on the other end making shots and looking at guys. It's a great player and a great shot. If I got any closer, I was going to foul him. Big shot."

Anthony jogged to the other end of the floor after hitting the shot, nodding his head and shouting to no one in particular as the Cavaliers called timeout.

"A lot of people got some good pictures out of that moment," Anthony said. "I wanted the ball. I made the shot."

Cleveland had a chance to win it at the buzzer, but James slipped while receiving the inbound pass and his 3-pointer rattled off the rim.

James, who played 47 minutes, missed his final four shots. Anthony, who played 48 minutes, made 7 of his last 8. Anthony and the Nuggets have now won 10 of 14 games against James and the Cavaliers since the two superstars entered the league.

"It was a great game to watch, but I'm not sure it will go on my coaching resume as very polished," Karl said. "We probably should have won the game a little easier. We kept giving them chances and they kept taking advantage of them."

Karl will likely miss some games and practices while undergoing a rigorous six-week treatment program of radiation and chemotherapy, but he accompanied the Nuggets on their two-game trip after deciding against taking time off now.

"I think I need the gym and I need the juice of being happy about kicking someone's butt and preparing and watching video," Karl said. "I felt very early it made no sense for me to separate from the team. ... It's going to be my sanctuary to do what I like to do and forget maybe the things that are always going to pop into your mind."

Denver's Kenyon Martin had 18 points and a season-high 17 rebounds, but the night belonged to two of the league's top three scorers, who put on a memorable display.

Anthony added seven assists and six rebounds for the Nuggets. James' triple-double was his third of the season and 27th of his career. He scored 18 of Cleveland's 27 points in the fourth quarter and his 15 assists tied a career high.

James and Anthony entered first and third in the league in scoring, just as they entered the league in 2003 as the No. 1 and No. 3 overall picks. Neither disappointed on Thursday. The two combined to make just 4 of 20 shots in the first quarter, then spent the rest of the night hitting huge shots in each other's face.

"You want to play against the best on the biggest stage," James said. "Tonight was a big stage and we both did what we had to do to put our teams in position to win. He just made one more play."

The Cavaliers introduced Antawn Jamison on Thursday, but were a bit short-handed since he couldn't be activated in time for the game. They traded Zydrunas Ilgauskas on Wednesday to acquire Jamison in a three-team deal from Washington and the team is hopeful Jamison can be in the lineup Friday at Charlotte.

Shaquille O'Neal had 18 points and seven rebounds and J.J. Hickson had 14 points for Cleveland, which made just 23 of 40 free throws.

"We have to chalk this under another game of us beating ourselves," O'Neal said. "The whole world knows we beat ourselves tonight. Too many turnovers, too many missed shots."

Game notes

Robertson believes James could average a triple-double for a season, as he did. "No doubt about it," he said. ... Denver reserve Chris Andersen walked to the locker room while holding his back in the fourth quarter. He did not return. ... Martin returned to the Nuggets after missing the final two games before the break with tendinitis in his left knee. ... Denver has won five of its last seven in Cleveland.